diff options
author | Trond Myklebust <trond.myklebust@primarydata.com> | 2016-06-26 12:39:49 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-10-07 15:21:24 +0200 |
commit | 0c8716b6e61f139f22ddd2d9a9366b696830e73f (patch) | |
tree | 753d7ea78b4730426b775e82e5fad327095e1a2f | |
parent | 2bd1cf2e2f64fe257eec8ea06a71e8b94abd06c0 (diff) | |
download | linux-stable-0c8716b6e61f139f22ddd2d9a9366b696830e73f.tar.gz linux-stable-0c8716b6e61f139f22ddd2d9a9366b696830e73f.tar.bz2 linux-stable-0c8716b6e61f139f22ddd2d9a9366b696830e73f.zip |
pNFS/flexfiles: Fix layoutcommit after a commit to DS
commit c001c87a63aa2f35358e33eb05e45e4cbcb34f54 upstream.
We should always do a layoutcommit after commit to DS, except if
the layout segment we're using has set FF_FLAGS_NO_LAYOUTCOMMIT.
Fixes: d67ae825a59d ("pnfs/flexfiles: Add the FlexFile Layout Driver")
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | fs/nfs/flexfilelayout/flexfilelayout.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/nfs/flexfilelayout/flexfilelayout.c b/fs/nfs/flexfilelayout/flexfilelayout.c index 6da14aedde2b..b51d5825aefb 100644 --- a/fs/nfs/flexfilelayout/flexfilelayout.c +++ b/fs/nfs/flexfilelayout/flexfilelayout.c @@ -1529,8 +1529,7 @@ static int ff_layout_commit_done_cb(struct rpc_task *task, return -EAGAIN; } - if (data->verf.committed == NFS_UNSTABLE - && ff_layout_need_layoutcommit(data->lseg)) + if (ff_layout_need_layoutcommit(data->lseg)) pnfs_set_layoutcommit(data->inode, data->lseg, data->lwb); return 0; |