diff mbox series

[01/11] NFSv4/pnfs: Remove redundant list check

Message ID 20240613050055.854323-2-trond.myklebust@hammerspace.com (mailing list archive)
State New
Headers show
Series LAYOUTRETURN on reboot | expand

Commit Message

Trond Myklebust June 13, 2024, 5 a.m. UTC
From: Trond Myklebust <trond.myklebust@hammerspace.com>

pnfs_layout_free_bulk_destroy_list() already checks for whether the list
is empty or not.

Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
---
 fs/nfs/pnfs.c | 4 ----
 1 file changed, 4 deletions(-)
diff mbox series

Patch

diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index b5834728f31b..bbbb692b2a47 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -923,8 +923,6 @@  pnfs_destroy_layouts_byfsid(struct nfs_client *clp,
 	rcu_read_unlock();
 	spin_unlock(&clp->cl_lock);
 
-	if (list_empty(&layout_list))
-		return 0;
 	return pnfs_layout_free_bulk_destroy_list(&layout_list, is_recall);
 }
 
@@ -947,8 +945,6 @@  pnfs_destroy_layouts_byclid(struct nfs_client *clp,
 	rcu_read_unlock();
 	spin_unlock(&clp->cl_lock);
 
-	if (list_empty(&layout_list))
-		return 0;
 	return pnfs_layout_free_bulk_destroy_list(&layout_list, is_recall);
 }