summaryrefslogtreecommitdiffstats
path: root/fs/nfs/pnfs.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2012-09-21 16:37:02 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-09-28 16:03:17 -0400
commite5929f3cff05e84f20c68df235f4768920e2e89e (patch)
tree849a2fec772d7c8d9a54288659f9d4ba9c8a915f /fs/nfs/pnfs.c
parent173f77e9c5cbddb02eebe17dd9c48d39e5eb86b9 (diff)
NFSv4.1: Remove the NFS_LAYOUT_RETURNED state
It serves no purpose that the test for whether or not we have valid layout segments doesn't already serve. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/pnfs.c')
-rw-r--r--fs/nfs/pnfs.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index 174c51a5001..20a1b6222ff 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -692,7 +692,7 @@ _pnfs_return_layout(struct inode *ino)
spin_lock(&ino->i_lock);
lo = nfsi->layout;
- if (!lo || pnfs_test_layout_returned(lo)) {
+ if (!lo) {
spin_unlock(&ino->i_lock);
dprintk("NFS: %s no layout to return\n", __func__);
goto out;
@@ -710,7 +710,6 @@ _pnfs_return_layout(struct inode *ino)
goto out;
}
lo->plh_block_lgets++;
- pnfs_mark_layout_returned(lo);
spin_unlock(&ino->i_lock);
pnfs_free_lseg_list(&tmp_list);
@@ -721,7 +720,6 @@ _pnfs_return_layout(struct inode *ino)
status = -ENOMEM;
pnfs_layout_io_set_failed(lo, IOMODE_RW);
pnfs_layout_io_set_failed(lo, IOMODE_READ);
- pnfs_clear_layout_returned(lo);
pnfs_put_layout_hdr(lo);
goto out;
}
@@ -1111,9 +1109,6 @@ pnfs_update_layout(struct inode *ino,
if (list_empty(&lo->plh_segs))
first = true;
- /* Enable LAYOUTRETURNs */
- pnfs_clear_layout_returned(lo);
-
spin_unlock(&ino->i_lock);
if (first) {
/* The lo must be on the clp list if there is any