diff options
| author | Jan Kara <jack@suse.cz> | 2024-02-06 17:08:19 +0300 |
|---|---|---|
| committer | Jan Kara <jack@suse.cz> | 2024-02-08 14:04:59 +0300 |
| commit | ccb49011bb2ebfd66164dbf68c5bff48917bb5ef (patch) | |
| tree | 28798f5cf34d1892d0957e4cbffe2b530d46235e /include/linux | |
| parent | 179b8c97ebf63429589f5afeba59a181fe70603e (diff) | |
| download | linux-ccb49011bb2ebfd66164dbf68c5bff48917bb5ef.tar.xz | |
quota: Properly annotate i_dquot arrays with __rcu
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>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/fs.h | 2 | ||||
| -rw-r--r-- | include/linux/shmem_fs.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index ed5966a70495..d0b849e4f6cd 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -2159,7 +2159,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 2caa6b86106a..66828dfc6e74 100644 --- a/include/linux/shmem_fs.h +++ b/include/linux/shmem_fs.h @@ -37,7 +37,7 @@ struct shmem_inode_info { unsigned int fsflags; /* for FS_IOC_[SG]ETFLAGS */ atomic_t stop_eviction; /* hold when working on inode */ #ifdef CONFIG_TMPFS_QUOTA - struct dquot *i_dquot[MAXQUOTAS]; + struct dquot __rcu *i_dquot[MAXQUOTAS]; #endif struct inode vfs_inode; }; |
