[pnfs] [PATCH 4/5] pnfs: delete layout segment from list in destroy_lseg
andros at umich.edu
andros at umich.edu
Fri Feb 1 14:14:14 EST 2008
From: Andy Adamson <andros at umich.edu>
put_lseg() can call destroy_lseg() from various points in the code. Move
the deletion of the layout segement from the layout segment list into
destroy_lseg() to guarantee deletion from the list prior to freeing the
layout segment.
Signed-off-by: Andy Adamson<andros at umich.edu>
---
fs/nfs/pnfs.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index 3f34f34..4b97147 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -371,6 +371,7 @@ destroy_lseg(struct kref *kref)
struct pnfs_layout_segment *lseg =
container_of(kref, struct pnfs_layout_segment, kref);
+ list_del_init(&lseg->fi_list);
PNFS_LD_IO_OPS(lseg->layout)->free_lseg(lseg);
}
@@ -503,7 +504,6 @@ pnfs_free_layout(struct pnfs_layout_type *lo,
"offset %llu length %lld\n", __FUNCTION__,
lseg, lseg->range.iomode, lseg->range.offset,
lseg->range.length);
- list_del(&lseg->fi_list);
put_lseg(lseg);
}
--
1.5.0.2
More information about the pNFS
mailing list