]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - fs/nfs/filelayout/filelayout.c
nfs/filelayout: set layoutcommit depending on write verifier
[karo-tx-linux.git] / fs / nfs / filelayout / filelayout.c
index 90978075f7302a791813b6dd29c0ec9f9e5850eb..163cad1d41274632ce954af2f07842b5aef6c0af 100644 (file)
@@ -265,7 +265,7 @@ filelayout_set_layoutcommit(struct nfs_pgio_header *hdr)
 {
 
        if (FILELAYOUT_LSEG(hdr->lseg)->commit_through_mds ||
-           hdr->res.verf->committed == NFS_FILE_SYNC)
+           hdr->res.verf->committed != NFS_DATA_SYNC)
                return;
 
        pnfs_set_layoutcommit(hdr);
@@ -403,6 +403,9 @@ static int filelayout_commit_done_cb(struct rpc_task *task,
                return -EAGAIN;
        }
 
+       if (data->verf.committed == NFS_UNSTABLE)
+               pnfs_commit_set_layoutcommit(data);
+
        return 0;
 }