Skip to contentSkip to conversation

cifsd: convert list_for_each to entry variant in vfs_cache.c

PATCH New Baokun Li 1 participant 1 message Jun 17, 2021

Subsystems (3)
lore
Share & tools
lore

Baokun Li

author
#0 lore raw

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.

---
 fs/cifsd/vfs_cache.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
fs/cifsd/vfs_cache.c +1 -3
index 6ea09fe82814..57044b189531 100644
@@ -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);