aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4filelayout.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2012-09-20 15:07:45 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-09-28 16:03:12 -0400
commit965938b83b19aeffdc1d16ce9947c8c127e8f59b (patch)
tree40288cb09fb91d508cc7e43ce565aa9b3a2a6137 /fs/nfs/nfs4filelayout.c
parentNFSv4.1: Simplify the pNFS return-on-close code (diff)
downloadlinux-dev-965938b83b19aeffdc1d16ce9947c8c127e8f59b.tar.xz
linux-dev-965938b83b19aeffdc1d16ce9947c8c127e8f59b.zip
NFSv4.1: Get rid of pNFS layout state "NFS_LAYOUT_INVALID"
In all cases where we set NFS_LAYOUT_INVALID, we also set NFS_LAYOUT_DESTROYED. Furthermore, in all cases where we test for NFS_LAYOUT_INVALID, we should also be testing for NFS_LAYOUT_DESTROYED, since the latter means that we hold no valid layout segments. Ergo the two are redundant. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4filelayout.c')
-rw-r--r--fs/nfs/nfs4filelayout.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/nfs/nfs4filelayout.c b/fs/nfs/nfs4filelayout.c
index dac2162c3ac4..6cce57e7fe55 100644
--- a/fs/nfs/nfs4filelayout.c
+++ b/fs/nfs/nfs4filelayout.c
@@ -190,8 +190,6 @@ static int filelayout_async_handle_error(struct rpc_task *task,
* i/o and all i/o waiting on the slot table to the MDS until
* layout is destroyed and a new valid layout is obtained.
*/
- set_bit(NFS_LAYOUT_INVALID,
- &NFS_I(inode)->layout->plh_flags);
pnfs_destroy_layout(NFS_I(inode));
rpc_wake_up(&tbl->slot_tbl_waitq);
goto reset;
@@ -281,7 +279,7 @@ filelayout_reset_to_mds(struct pnfs_layout_segment *lseg)
{
struct nfs4_deviceid_node *node = FILELAYOUT_DEVID_NODE(lseg);
- return filelayout_test_layout_invalid(lseg->pls_layout) ||
+ return pnfs_test_layout_destroyed(lseg->pls_layout) ||
filelayout_test_devid_unavailable(node);
}