* [PATCH -next] cifsd: convert list_for_each to entry variant in smb_common.c
@ 2021-06-17 13:22 Baokun Li
0 siblings, 0 replies; only message in thread
From: Baokun Li @ 2021-06-17 13:22 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.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Baokun Li <libaokun1@huawei.com>
---
fs/cifsd/smb_common.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/fs/cifsd/smb_common.c b/fs/cifsd/smb_common.c
index 039030968b50..d74b2ce08187 100644
--- a/fs/cifsd/smb_common.c
+++ b/fs/cifsd/smb_common.c
@@ -481,15 +481,13 @@ int ksmbd_smb_check_shared_mode(struct file *filp, struct ksmbd_file *curr_fp)
{
int rc = 0;
struct ksmbd_file *prev_fp;
- struct list_head *cur;
/*
* Lookup fp in master fp list, and check desired access and
* shared mode between previous open and current open.
*/
read_lock(&curr_fp->f_ci->m_lock);
- list_for_each(cur, &curr_fp->f_ci->m_fp_list) {
- prev_fp = list_entry(cur, struct ksmbd_file, node);
+ list_for_each_entry(prev_fp, &curr_fp->f_ci->m_fp_list, node) {
if (file_inode(filp) != FP_INODE(prev_fp))
continue;
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2021-06-17 13:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-17 13:22 [PATCH -next] cifsd: convert list_for_each to entry variant in smb_common.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).