aboutsummaryrefslogtreecommitdiff
path: root/fs/nfs/nfs4proc.c
diff options
context:
space:
mode:
authorGravatar Trond Myklebust <trond.myklebust@primarydata.com> 2017-04-29 10:10:17 -0400
committerGravatar Trond Myklebust <trond.myklebust@primarydata.com> 2017-04-29 11:29:30 -0400
commit1f18b82c3437a398562e748c22fcd2f71c2e230c (patch)
tree97e948dd43a509e011585414fb5f600462ba9093 /fs/nfs/nfs4proc.c
parentpNFS: Don't send COMMITs to the DSes if the server invalidated our layout (diff)
downloadlinux-1f18b82c3437a398562e748c22fcd2f71c2e230c.tar.gz
linux-1f18b82c3437a398562e748c22fcd2f71c2e230c.tar.bz2
linux-1f18b82c3437a398562e748c22fcd2f71c2e230c.zip
pNFS: Ensure we commit the layout if it has been invalidated
If the layout is being invalidated on the server, then we must invoke nfs_commit_inode() to ensure any commits to the DS get cleared out. Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'fs/nfs/nfs4proc.c')
-rw-r--r--fs/nfs/nfs4proc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index c2b82caa9068..158c3d52146f 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -8330,6 +8330,7 @@ nfs4_layoutget_handle_exception(struct rpc_task *task,
*/
pnfs_mark_layout_stateid_invalid(lo, &head);
spin_unlock(&inode->i_lock);
+ nfs_commit_inode(inode, 0);
pnfs_free_lseg_list(&head);
status = -EAGAIN;
goto out;