aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifsd/vfs_cache.c
diff options
context:
space:
mode:
authorNamjae Jeon <namjae.jeon@samsung.com>2021-06-18 10:28:52 +0900
committerNamjae Jeon <namjae.jeon@samsung.com>2021-06-22 16:11:29 +0900
commit6f3d5eeec744727bf017be3bb12e7fbf1c4438ed (patch)
tree606f0602e10a29eef752810c0db433c7dfd01b9f /fs/cifsd/vfs_cache.c
parentksmbd: remove ksmbd_vfs_copy_file_range (diff)
downloadlinux-dev-6f3d5eeec744727bf017be3bb12e7fbf1c4438ed.tar.xz
linux-dev-6f3d5eeec744727bf017be3bb12e7fbf1c4438ed.zip
ksmbd: use list_for_each_entry instead of list_for_each
Use list_for_each_entry instead of list_for_each. Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to '')
-rw-r--r--fs/cifsd/vfs_cache.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/cifsd/vfs_cache.c b/fs/cifsd/vfs_cache.c
index dcac1f0a29e4..3f18018668b6 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);