summaryrefslogtreecommitdiffstats
path: root/fs/nfs/callback_proc.c
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@primarydata.com>2015-12-28 17:48:14 +0100
committerTrond Myklebust <trond.myklebust@primarydata.com>2015-12-28 20:33:04 +0100
commit0654cc726fc6eed6dca915fb65ba7975716ea080 (patch)
tree367e0058259d17d89ffec6d02ea333aa4bb5485f /fs/nfs/callback_proc.c
parentpNFS: Ensure nfs4_layoutget_prepare returns the correct error (diff)
downloadlinux-0654cc726fc6eed6dca915fb65ba7975716ea080.tar.xz
linux-0654cc726fc6eed6dca915fb65ba7975716ea080.zip
NFSv4.1/pNFS: Add a helper to mark the layout as returned
This ensures that we don't reuse the stateid if a layout return or implied layout return means that we've returned all layout segments Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'fs/nfs/callback_proc.c')
-rw-r--r--fs/nfs/callback_proc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/nfs/callback_proc.c b/fs/nfs/callback_proc.c
index 807eb6ef4f91..716cbff24450 100644
--- a/fs/nfs/callback_proc.c
+++ b/fs/nfs/callback_proc.c
@@ -192,6 +192,7 @@ static u32 initiate_file_draining(struct nfs_client *clp,
NFS_SERVER(ino)->pnfs_curr_ld->return_range(lo,
&args->cbl_range);
}
+ pnfs_mark_layout_returned_if_empty(lo);
unlock:
spin_unlock(&ino->i_lock);
pnfs_free_lseg_list(&free_me_list);