@@ -410,7 +410,11 @@ mark_matching_lsegs_invalid(struct pnfs_layout_hdr *lo,
return invalid - removed;
}
-/* Returns false if there was nothing to do, true otherwise */
+/*
+ * Returns false if there was nothing to do, true otherwise.
+ *
+ * Must be called under the i_lock (unless from the nfs4_evict_inode path)
+ */
static bool
pnfs_clear_lseg_list(struct pnfs_layout_hdr *lo, struct list_head *tmp_list,
struct pnfs_layout_range *range)
@@ -420,7 +424,6 @@ pnfs_clear_lseg_list(struct pnfs_layout_hdr *lo, struct list_head *tmp_list,
dprintk("%s:Begin lo %p offset %llu length %llu iomode %d\n",
__func__, lo, range->offset, range->length, range->iomode);
- assert_spin_locked(&lo->plh_inode->i_lock);
if (list_empty(&lo->plh_segs)) {
if (!test_and_set_bit(NFS_LAYOUT_DESTROYED, &lo->plh_flags))
put_layout_hdr_locked(lo);
currently it's called only from the evict_inode path no lock is needed there... Signed-off-by: Benny Halevy <bhalevy@panasas.com> --- fs/nfs/pnfs.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-)