summaryrefslogtreecommitdiffstats
path: root/fs/quota/dquot.c
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2024-02-06 15:08:19 +0100
committerJan Kara <jack@suse.cz>2024-02-08 12:04:59 +0100
commitccb49011bb2ebfd66164dbf68c5bff48917bb5ef (patch)
tree28798f5cf34d1892d0957e4cbffe2b530d46235e /fs/quota/dquot.c
parent179b8c97ebf63429589f5afeba59a181fe70603e (diff)
downloadlinux-stable-ccb49011bb2ebfd66164dbf68c5bff48917bb5ef.tar.gz
linux-stable-ccb49011bb2ebfd66164dbf68c5bff48917bb5ef.tar.bz2
linux-stable-ccb49011bb2ebfd66164dbf68c5bff48917bb5ef.zip
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 'fs/quota/dquot.c')
-rw-r--r--fs/quota/dquot.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c
index 22754460fb6f..f73016c7bc39 100644
--- a/fs/quota/dquot.c
+++ b/fs/quota/dquot.c
@@ -998,8 +998,7 @@ EXPORT_SYMBOL(dqget);
static inline struct dquot __rcu **i_dquot(struct inode *inode)
{
- /* Force __rcu for now until filesystems are fixed */
- return (struct dquot __rcu **)inode->i_sb->s_op->get_dquots(inode);
+ return inode->i_sb->s_op->get_dquots(inode);
}
static int dqinit_needed(struct inode *inode, int type)