aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/nfs/pnfs.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index 8b32f874533..ac94fb86fd1 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -215,9 +215,13 @@ pnfs_free_layout_hdr(struct pnfs_layout_hdr *lo)
215static void 215static void
216destroy_layout_hdr(struct pnfs_layout_hdr *lo) 216destroy_layout_hdr(struct pnfs_layout_hdr *lo)
217{ 217{
218 struct nfs_inode *nfsi = NFS_I(lo->plh_inode);
218 dprintk("%s: freeing layout cache %p\n", __func__, lo); 219 dprintk("%s: freeing layout cache %p\n", __func__, lo);
219 BUG_ON(!list_empty(&lo->plh_layouts)); 220 BUG_ON(!list_empty(&lo->plh_layouts));
220 NFS_I(lo->plh_inode)->layout = NULL; 221 nfsi->layout = NULL;
222 /* Reset MDS Threshold I/O counters */
223 nfsi->write_io = 0;
224 nfsi->read_io = 0;
221 pnfs_free_layout_hdr(lo); 225 pnfs_free_layout_hdr(lo);
222} 226}
223 227
@@ -461,9 +465,6 @@ pnfs_mark_matching_lsegs_invalid(struct pnfs_layout_hdr *lo,
461 dprintk("%s:Begin lo %p\n", __func__, lo); 465 dprintk("%s:Begin lo %p\n", __func__, lo);
462 466
463 if (list_empty(&lo->plh_segs)) { 467 if (list_empty(&lo->plh_segs)) {
464 /* Reset MDS Threshold I/O counters */
465 NFS_I(lo->plh_inode)->write_io = 0;
466 NFS_I(lo->plh_inode)->read_io = 0;
467 if (!test_and_set_bit(NFS_LAYOUT_DESTROYED, &lo->plh_flags)) 468 if (!test_and_set_bit(NFS_LAYOUT_DESTROYED, &lo->plh_flags))
468 pnfs_put_layout_hdr_locked(lo); 469 pnfs_put_layout_hdr_locked(lo);
469 return 0; 470 return 0;