summaryrefslogtreecommitdiff
path: root/fs/jfs
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2024-02-06 17:08:19 +0300
committerJan Kara <jack@suse.cz>2024-02-08 14:04:59 +0300
commitccb49011bb2ebfd66164dbf68c5bff48917bb5ef (patch)
tree28798f5cf34d1892d0957e4cbffe2b530d46235e /fs/jfs
parent179b8c97ebf63429589f5afeba59a181fe70603e (diff)
downloadlinux-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 'fs/jfs')
-rw-r--r--fs/jfs/jfs_incore.h2
-rw-r--r--fs/jfs/super.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/fs/jfs/jfs_incore.h b/fs/jfs/jfs_incore.h
index dd4264aa9bed..10934f9a11be 100644
--- a/fs/jfs/jfs_incore.h
+++ b/fs/jfs/jfs_incore.h
@@ -92,7 +92,7 @@ struct jfs_inode_info {
} link;
} u;
#ifdef CONFIG_QUOTA
- struct dquot *i_dquot[MAXQUOTAS];
+ struct dquot __rcu *i_dquot[MAXQUOTAS];
#endif
u32 dev; /* will die when we get wide dev_t */
struct inode vfs_inode;
diff --git a/fs/jfs/super.c b/fs/jfs/super.c
index 8d8e556bd610..ff135a43b5b7 100644
--- a/fs/jfs/super.c
+++ b/fs/jfs/super.c
@@ -824,7 +824,7 @@ out:
return len - towrite;
}
-static struct dquot **jfs_get_dquots(struct inode *inode)
+static struct dquot __rcu **jfs_get_dquots(struct inode *inode)
{
return JFS_IP(inode)->i_dquot;
}