* [PATCH -next] cifsd: convert list_for_each to entry variant in vfs_cache.c
@ 2021-06-17 6:44 Baokun Li
0 siblings, 0 replies; only message in thread
From: Baokun Li @ 2021-06-17 6:44 UTC (permalink / raw)
To: libaokun1, Namjae Jeon, Sergey Senozhatsky, Steve French, Hyunchul Lee
Cc: linux-cifs, linux-cifsd-devel, kernel-janitors, Hulk Robot
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);
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2021-06-17 6:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-17 6:44 [PATCH -next] cifsd: convert list_for_each to entry variant in vfs_cache.c Baokun Li
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).