Skip to content

Commit b8ec59c

Browse files
Trond Myklebustamschuma-ntap
authored andcommitted
NFSv4/pnfs: Remove redundant list check
pnfs_layout_free_bulk_destroy_list() already checks for whether the list is empty or not. Signed-off-by: Trond Myklebust <[email protected]> Reviewed-by: Jeff Layton <[email protected]> Signed-off-by: Anna Schumaker <[email protected]>
1 parent cf453bf commit b8ec59c

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

fs/nfs/pnfs.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -923,8 +923,6 @@ pnfs_destroy_layouts_byfsid(struct nfs_client *clp,
923923
rcu_read_unlock();
924924
spin_unlock(&clp->cl_lock);
925925

926-
if (list_empty(&layout_list))
927-
return 0;
928926
return pnfs_layout_free_bulk_destroy_list(&layout_list, is_recall);
929927
}
930928

@@ -947,8 +945,6 @@ pnfs_destroy_layouts_byclid(struct nfs_client *clp,
947945
rcu_read_unlock();
948946
spin_unlock(&clp->cl_lock);
949947

950-
if (list_empty(&layout_list))
951-
return 0;
952948
return pnfs_layout_free_bulk_destroy_list(&layout_list, is_recall);
953949
}
954950

0 commit comments

Comments
 (0)