cifsd: convert list_for_each to entry variant in vfs_cache.c
Subsystems (3)
PATCH 1/1 cifsd: convert list_for_each to entry variant in vfs_cache.c
convert list_for_each() to list_for_each_entry() where applicable in vfs_cache.c.
Reported-by Hulk Robot <[email protected]>
Signed-off-by Baokun Li <[email protected]>
--- fs/cifsd/vfs_cache.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
fs/cifsd/vfs_cache.c +1 -3
@@ -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);