]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
NFSv4/pnfs: Remove redundant list check
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Thu, 13 Jun 2024 05:00:45 +0000 (01:00 -0400)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Mon, 8 Jul 2024 17:47:26 +0000 (13:47 -0400)
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>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
fs/nfs/pnfs.c

index b5834728f31b3208d69e162423d5f4489fffb00a..bbbb692b2a47ef8dfb3997578c19f3e8be0970ab 100644 (file)
@@ -923,8 +923,6 @@ restart:
        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 @@ restart:
        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);
 }