diff options
author | Trond Myklebust <trond.myklebust@primarydata.com> | 2017-04-29 10:10:17 -0400 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@primarydata.com> | 2017-04-29 11:29:30 -0400 |
commit | 1f18b82c3437a398562e748c22fcd2f71c2e230c (patch) | |
tree | 97e948dd43a509e011585414fb5f600462ba9093 /fs/nfs/pnfs.c | |
parent | 722f0b891198ab1f5f7b020e32c989a517ed0577 (diff) |
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/pnfs.c')
-rw-r--r-- | fs/nfs/pnfs.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c index 6c2e4c73684c..140ecd7d350f 100644 --- a/fs/nfs/pnfs.c +++ b/fs/nfs/pnfs.c @@ -727,6 +727,7 @@ pnfs_destroy_layout(struct nfs_inode *nfsi) pnfs_layout_clear_fail_bit(lo, NFS_LAYOUT_RW_FAILED); spin_unlock(&nfsi->vfs_inode.i_lock); pnfs_free_lseg_list(&tmp_list); + nfs_commit_inode(&nfsi->vfs_inode, 0); pnfs_put_layout_hdr(lo); } else spin_unlock(&nfsi->vfs_inode.i_lock); @@ -1989,6 +1990,8 @@ out_forget: spin_unlock(&ino->i_lock); lseg->pls_layout = lo; NFS_SERVER(ino)->pnfs_curr_ld->free_lseg(lseg); + if (!pnfs_layout_is_valid(lo)) + nfs_commit_inode(ino, 0); return ERR_PTR(-EAGAIN); } |