summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2024-02-06 15:08:19 +0100
committerSasha Levin <sashal@kernel.org>2024-03-26 18:19:46 -0400
commit42954c374534f37dd25a4096b52d28e46dc1f8ba (patch)
tree26f0acb10b260ff61d5ed3d62e2f68d275136709 /include
parente45e8aa2b70ac521a12ae0cb76bd8a94f6ea03da (diff)
downloadlinux-42954c374534f37dd25a4096b52d28e46dc1f8ba.tar.gz
linux-42954c374534f37dd25a4096b52d28e46dc1f8ba.tar.bz2
linux-42954c374534f37dd25a4096b52d28e46dc1f8ba.zip
quota: Properly annotate i_dquot arrays with __rcu
[ Upstream commit ccb49011bb2ebfd66164dbf68c5bff48917bb5ef ] Dquots pointed to from i_dquot arrays in inodes are protected by dquot_srcu. Annotate them as such and change .get_dquots callback to return properly annotated pointer to make sparse happy. Fixes: b9ba6f94b238 ("quota: remove dqptr_sem") Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/fs.h2
-rw-r--r--include/linux/shmem_fs.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 62102f869794..ee5efad0d780 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -2079,7 +2079,7 @@ struct super_operations {
#ifdef CONFIG_QUOTA
ssize_t (*quota_read)(struct super_block *, int, char *, size_t, loff_t);
ssize_t (*quota_write)(struct super_block *, int, const char *, size_t, loff_t);
- struct dquot **(*get_dquots)(struct inode *);
+ struct dquot __rcu **(*get_dquots)(struct inode *);
#endif
long (*nr_cached_objects)(struct super_block *,
struct shrink_control *);
diff --git a/include/linux/shmem_fs.h b/include/linux/shmem_fs.h
index 6b0c626620f5..fa99e68e5e77 100644
--- a/include/linux/shmem_fs.h
+++ b/include/linux/shmem_fs.h
@@ -32,7 +32,7 @@ struct shmem_inode_info {
struct timespec64 i_crtime; /* file creation time */
unsigned int fsflags; /* flags for FS_IOC_[SG]ETFLAGS */
#ifdef CONFIG_TMPFS_QUOTA
- struct dquot *i_dquot[MAXQUOTAS];
+ struct dquot __rcu *i_dquot[MAXQUOTAS];
#endif
struct offset_ctx dir_offsets; /* stable entry offsets */
struct inode vfs_inode;