Commit ccb49011 authored by Jan Kara's avatar Jan Kara
Browse files

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: b9ba6f94 ("quota: remove dqptr_sem")
Signed-off-by: default avatarJan Kara <jack@suse.cz>
parent 179b8c97
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -674,7 +674,7 @@ struct ext2_inode_info {
	struct inode	vfs_inode;
	struct list_head i_orphan;	/* unlinked but open inodes */
#ifdef CONFIG_QUOTA
	struct dquot *i_dquot[MAXQUOTAS];
	struct dquot __rcu *i_dquot[MAXQUOTAS];
#endif
};

+1 −1
Original line number Diff line number Diff line
@@ -320,7 +320,7 @@ static ssize_t ext2_quota_read(struct super_block *sb, int type, char *data, siz
static ssize_t ext2_quota_write(struct super_block *sb, int type, const char *data, size_t len, loff_t off);
static int ext2_quota_on(struct super_block *sb, int type, int format_id,
			 const struct path *path);
static struct dquot **ext2_get_dquots(struct inode *inode)
static struct dquot __rcu **ext2_get_dquots(struct inode *inode)
{
	return EXT2_I(inode)->i_dquot;
}
+1 −1
Original line number Diff line number Diff line
@@ -1156,7 +1156,7 @@ struct ext4_inode_info {
	tid_t i_datasync_tid;

#ifdef CONFIG_QUOTA
	struct dquot *i_dquot[MAXQUOTAS];
	struct dquot __rcu *i_dquot[MAXQUOTAS];
#endif

	/* Precomputed uuid+inum+igen checksum for seeding inode checksums */
+1 −1
Original line number Diff line number Diff line
@@ -1600,7 +1600,7 @@ static ssize_t ext4_quota_write(struct super_block *sb, int type,
static int ext4_quota_enable(struct super_block *sb, int type, int format_id,
			     unsigned int flags);

static struct dquot **ext4_get_dquots(struct inode *inode)
static struct dquot __rcu **ext4_get_dquots(struct inode *inode)
{
	return EXT4_I(inode)->i_dquot;
}
+1 −1
Original line number Diff line number Diff line
@@ -829,7 +829,7 @@ struct f2fs_inode_info {
	spinlock_t i_size_lock;		/* protect last_disk_size */

#ifdef CONFIG_QUOTA
	struct dquot *i_dquot[MAXQUOTAS];
	struct dquot __rcu *i_dquot[MAXQUOTAS];

	/* quota space reservation, managed internally by quota code */
	qsize_t i_reserved_quota;
Loading