From: Ye Bin <yebin10@xxxxxxxxxx> Use sb_for_each_inodes API foreach super_block->s_inodes. Signed-off-by: Ye Bin <yebin10@xxxxxxxxxx> --- fs/quota/dquot.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c index b40410cd39af..414f92bb762c 100644 --- a/fs/quota/dquot.c +++ b/fs/quota/dquot.c @@ -1027,7 +1027,7 @@ static int add_dquot_ref(struct super_block *sb, int type) int err = 0; spin_lock(&sb->s_inode_list_lock); - list_for_each_entry(inode, &sb->s_inodes, i_sb_list) { + sb_for_each_inodes(inode, &sb->s_inodes) { spin_lock(&inode->i_lock); if ((inode->i_state & (I_FREEING|I_WILL_FREE|I_NEW)) || !atomic_read(&inode->i_writecount) || @@ -1083,7 +1083,7 @@ static void remove_dquot_ref(struct super_block *sb, int type) #endif spin_lock(&sb->s_inode_list_lock); - list_for_each_entry(inode, &sb->s_inodes, i_sb_list) { + sb_for_each_inodes(inode, &sb->s_inodes) { /* * We have to scan also I_NEW inodes because they can already * have quota pointer initialized. Luckily, we need to touch -- 2.34.1