]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/4.7.7/pnfs-flexfiles-fix-layoutcommit-after-a-commit-to-ds.patch
fixes for 4.19
[thirdparty/kernel/stable-queue.git] / releases / 4.7.7 / pnfs-flexfiles-fix-layoutcommit-after-a-commit-to-ds.patch
1 From c001c87a63aa2f35358e33eb05e45e4cbcb34f54 Mon Sep 17 00:00:00 2001
2 From: Trond Myklebust <trond.myklebust@primarydata.com>
3 Date: Sun, 26 Jun 2016 12:39:49 -0400
4 Subject: pNFS/flexfiles: Fix layoutcommit after a commit to DS
5
6 From: Trond Myklebust <trond.myklebust@primarydata.com>
7
8 commit c001c87a63aa2f35358e33eb05e45e4cbcb34f54 upstream.
9
10 We should always do a layoutcommit after commit to DS, except if
11 the layout segment we're using has set FF_FLAGS_NO_LAYOUTCOMMIT.
12
13 Fixes: d67ae825a59d ("pnfs/flexfiles: Add the FlexFile Layout Driver")
14 Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
15 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
16
17 ---
18 fs/nfs/flexfilelayout/flexfilelayout.c | 3 +--
19 1 file changed, 1 insertion(+), 2 deletions(-)
20
21 --- a/fs/nfs/flexfilelayout/flexfilelayout.c
22 +++ b/fs/nfs/flexfilelayout/flexfilelayout.c
23 @@ -1529,8 +1529,7 @@ static int ff_layout_commit_done_cb(stru
24 return -EAGAIN;
25 }
26
27 - if (data->verf.committed == NFS_UNSTABLE
28 - && ff_layout_need_layoutcommit(data->lseg))
29 + if (ff_layout_need_layoutcommit(data->lseg))
30 pnfs_set_layoutcommit(data->inode, data->lseg, data->lwb);
31
32 return 0;