diff options
author | Trond Myklebust <trond.myklebust@primarydata.com> | 2015-03-25 12:36:13 -0400 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@primarydata.com> | 2015-03-27 12:39:38 -0400 |
commit | 7140171ea9be4143736c35acf6f31b6feb195ca0 (patch) | |
tree | 0709d24a7d3a34349fcd90dec12ec5604234826a /fs/nfs | |
parent | a0815d556d1cfb686b46995f86fb081f623fa720 (diff) | |
download | linux-7140171ea9be4143736c35acf6f31b6feb195ca0.tar.gz linux-7140171ea9be4143736c35acf6f31b6feb195ca0.tar.bz2 linux-7140171ea9be4143736c35acf6f31b6feb195ca0.zip |
NFSv4.1/pnfs: Ensure we send layoutcommit before return-on-close
We must not send a close or delegreturn that would result in a
return-on-close of the layout without ensuring that we've also
sent the necessary layoutcommit.
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r-- | fs/nfs/pnfs.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c index ea83f3c03c65..c2ce2db771b7 100644 --- a/fs/nfs/pnfs.c +++ b/fs/nfs/pnfs.c @@ -1090,6 +1090,7 @@ bool pnfs_roc(struct inode *ino) pnfs_get_layout_hdr(lo); /* matched in pnfs_roc_release */ spin_unlock(&ino->i_lock); pnfs_free_lseg_list(&tmp_list); + pnfs_layoutcommit_inode(ino, true); return true; out_noroc: @@ -1104,8 +1105,10 @@ out_noroc: } } spin_unlock(&ino->i_lock); - if (layoutreturn) + if (layoutreturn) { + pnfs_layoutcommit_inode(ino, true); pnfs_send_layoutreturn(lo, stateid, IOMODE_ANY, true); + } return false; } |