From: Baokun Li <libaokun1@huawei.com>
To: <libaokun1@huawei.com>, Namjae Jeon <namjae.jeon@samsung.com>,
"Sergey Senozhatsky" <sergey.senozhatsky@gmail.com>,
Steve French <sfrench@samba.org>,
Hyunchul Lee <hyc.lee@gmail.com>
Cc: <linux-cifs@vger.kernel.org>,
<linux-cifsd-devel@lists.sourceforge.net>,
<kernel-janitors@vger.kernel.org>, Hulk Robot <hulkci@huawei.com>
Subject: [PATCH -next] cifsd: convert list_for_each to entry variant in vfs_cache.c
Date: Thu, 17 Jun 2021 14:44:22 +0800 [thread overview]
Message-ID: <20210617064422.3191764-1-libaokun1@huawei.com> (raw)
convert list_for_each() to list_for_each_entry() where
applicable in vfs_cache.c.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Baokun Li <libaokun1@huawei.com>
---
fs/cifsd/vfs_cache.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/fs/cifsd/vfs_cache.c b/fs/cifsd/vfs_cache.c
index 6ea09fe82814..57044b189531 100644
--- a/fs/cifsd/vfs_cache.c
+++ b/fs/cifsd/vfs_cache.c
@@ -472,15 +472,13 @@ struct ksmbd_file *ksmbd_lookup_fd_inode(struct inode *inode)
{
struct ksmbd_file *lfp;
struct ksmbd_inode *ci;
- struct list_head *cur;
ci = ksmbd_inode_lookup_by_vfsinode(inode);
if (!ci)
return NULL;
read_lock(&ci->m_lock);
- list_for_each(cur, &ci->m_fp_list) {
- lfp = list_entry(cur, struct ksmbd_file, node);
+ list_for_each_entry(lfp, &ci->m_fp_list, node) {
if (inode == FP_INODE(lfp)) {
atomic_dec(&ci->m_count);
read_unlock(&ci->m_lock);
reply other threads:[~2021-06-17 6:35 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20210617064422.3191764-1-libaokun1@huawei.com \
--to=libaokun1@huawei.com \
--cc=hulkci@huawei.com \
--cc=hyc.lee@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-cifs@vger.kernel.org \
--cc=linux-cifsd-devel@lists.sourceforge.net \
--cc=namjae.jeon@samsung.com \
--cc=sergey.senozhatsky@gmail.com \
--cc=sfrench@samba.org \
/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;
as well as URLs for NNTP newsgroup(s).