summaryrefslogtreecommitdiffstats
path: root/fs/nfs/pnfs.c
diff options
context:
space:
mode:
authorPeng Tao <tao.peng@primarydata.com>2014-09-05 18:53:26 +0200
committerTom Haynes <loghyr@primarydata.com>2015-02-03 20:06:42 +0100
commite736a5b98c7aa98fe572990caf5fed9593c72a67 (patch)
tree211cb03b020a4f83005e8facd97fdd39429f7525 /fs/nfs/pnfs.c
parentnfs41: send layoutreturn in last put_lseg (diff)
downloadlinux-e736a5b98c7aa98fe572990caf5fed9593c72a67.tar.xz
linux-e736a5b98c7aa98fe572990caf5fed9593c72a67.zip
nfs41: clear NFS_LAYOUT_RETURN if layoutreturn is sent or failed to send
So that pnfs path is not disabled for ever. Signed-off-by: Peng Tao <tao.peng@primarydata.com> Signed-off-by: Tom Haynes <Thomas.Haynes@primarydata.com>
Diffstat (limited to '')
-rw-r--r--fs/nfs/pnfs.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index e9acfcfdc9a9..63992c826faf 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -921,6 +921,11 @@ pnfs_send_layoutreturn(struct pnfs_layout_hdr *lo, nfs4_stateid stateid,
status = nfs4_proc_layoutreturn(lrp);
out:
+ if (status) {
+ spin_lock(&ino->i_lock);
+ clear_bit(NFS_LAYOUT_RETURN, &lo->plh_flags);
+ spin_unlock(&ino->i_lock);
+ }
dprintk("<-- %s status: %d\n", __func__, status);
return status;
}