summaryrefslogtreecommitdiffstats
path: root/fs/nfs/pnfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfs/pnfs.c')
-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;
}