From: Ye Bin <yebin@huaweicloud.com>
To: viro@zeniv.linux.org.uk, brauner@kernel.org, jack@suse.cz,
linux-fsdevel@vger.kernel.org, axboe@kernel.dk,
linux-block@vger.kernel.org, agruenba@redhat.com,
gfs2@lists.linux.dev, amir73il@gmail.com, mic@digikod.net,
gnoack@google.com, paul@paul-moore.com, jmorris@namei.org,
serge@hallyn.com, linux-security-module@vger.kernel.org
Cc: yebin10@huawei.com, zhangxiaoxu5@huawei.com
Subject: [PATCH 03/11] fs: use sb_for_each_inodes API
Date: Mon, 18 Nov 2024 19:45:00 +0800 [thread overview]
Message-ID: <20241118114508.1405494-4-yebin@huaweicloud.com> (raw)
In-Reply-To: <20241118114508.1405494-1-yebin@huaweicloud.com>
From: Ye Bin <yebin10@huawei.com>
Use sb_for_each_inodes API foreach super_block->s_inodes.
Signed-off-by: Ye Bin <yebin10@huawei.com>
---
fs/drop_caches.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/drop_caches.c b/fs/drop_caches.c
index d45ef541d848..43a31fa2b7c2 100644
--- a/fs/drop_caches.c
+++ b/fs/drop_caches.c
@@ -21,7 +21,7 @@ static void drop_pagecache_sb(struct super_block *sb, void *unused)
struct inode *inode, *toput_inode = NULL;
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);
/*
* We must skip inodes in unusual state. We may also skip
--
2.34.1
next prev parent reply other threads:[~2024-11-18 11:45 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-18 11:44 [PATCH 00/11] fix hungtask due to repeated traversal of inodes list Ye Bin
2024-11-18 11:44 ` [PATCH 01/11] fs: introduce I_CURSOR flag for inode Ye Bin
2024-11-18 11:44 ` [PATCH 02/11] block: use sb_for_each_inodes API Ye Bin
2024-11-18 11:45 ` Ye Bin [this message]
2024-11-18 11:45 ` [PATCH 04/11] gfs2: " Ye Bin
2024-11-18 11:45 ` [PATCH 05/11] fs: use sb_for_each_inodes_safe API Ye Bin
2024-11-18 11:45 ` [PATCH 06/11] fsnotify: use sb_for_each_inodes API Ye Bin
2024-11-18 11:45 ` [PATCH 07/11] quota: " Ye Bin
2024-11-18 11:45 ` [PATCH 08/11] fs/super.c: " Ye Bin
2024-11-18 11:45 ` [PATCH 09/11] landlock: " Ye Bin
2024-11-18 11:45 ` [PATCH 10/11] fs: fix hungtask due to repeated traversal of inodes list Ye Bin
2024-12-04 11:17 ` Christian Brauner
2024-12-04 14:16 ` Jan Kara
2024-11-18 11:45 ` [PATCH 11/11] fs: fix potential soft lockup when 'sb->s_inodes' has large number of inodes Ye Bin
2024-12-04 7:04 ` [PATCH 00/11] fix hungtask due to repeated traversal of inodes list yebin (H)
2024-12-04 11:04 ` Mateusz Guzik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241118114508.1405494-4-yebin@huaweicloud.com \
--to=yebin@huaweicloud.com \
--cc=agruenba@redhat.com \
--cc=amir73il@gmail.com \
--cc=axboe@kernel.dk \
--cc=brauner@kernel.org \
--cc=gfs2@lists.linux.dev \
--cc=gnoack@google.com \
--cc=jack@suse.cz \
--cc=jmorris@namei.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=mic@digikod.net \
--cc=paul@paul-moore.com \
--cc=serge@hallyn.com \
--cc=viro@zeniv.linux.org.uk \
--cc=yebin10@huawei.com \
--cc=zhangxiaoxu5@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox