aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@hammerspace.com>2019-07-22 13:06:17 -0400
committerTrond Myklebust <trond.myklebust@hammerspace.com>2019-08-04 22:35:40 -0400
commit731c74dd987e4f1f3179223314c039ce38dd4f19 (patch)
tree8990cf47dde9b35989d24bc658fab2ad4b5b8eb7 /fs/nfs
parentc34fae003c79570b6c930b425fea3f0b7b1e7056 (diff)
NFSv4: Report the error from nfs4_select_rw_stateid()
In pnfs_update_layout() ensure that we do report any fatal errors from nfs4_select_rw_stateid(). Fixes: d9aba2b40de6 ("NFSv4: Don't use the zero stateid with layoutget") Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/pnfs.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index 75bd5b552ba4..4525d5acae38 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -1903,12 +1903,6 @@ lookup_again:
1903 goto out_unlock; 1903 goto out_unlock;
1904 } 1904 }
1905 1905
1906 if (!nfs4_valid_open_stateid(ctx->state)) {
1907 trace_pnfs_update_layout(ino, pos, count, iomode, lo, lseg,
1908 PNFS_UPDATE_LAYOUT_INVALID_OPEN);
1909 goto out_unlock;
1910 }
1911
1912 /* 1906 /*
1913 * Choose a stateid for the LAYOUTGET. If we don't have a layout 1907 * Choose a stateid for the LAYOUTGET. If we don't have a layout
1914 * stateid, or it has been invalidated, then we must use the open 1908 * stateid, or it has been invalidated, then we must use the open
@@ -1939,6 +1933,7 @@ lookup_again:
1939 iomode == IOMODE_RW ? FMODE_WRITE : FMODE_READ, 1933 iomode == IOMODE_RW ? FMODE_WRITE : FMODE_READ,
1940 NULL, &stateid, NULL); 1934 NULL, &stateid, NULL);
1941 if (status != 0) { 1935 if (status != 0) {
1936 lseg = ERR_PTR(status);
1942 trace_pnfs_update_layout(ino, pos, count, 1937 trace_pnfs_update_layout(ino, pos, count,
1943 iomode, lo, lseg, 1938 iomode, lo, lseg,
1944 PNFS_UPDATE_LAYOUT_INVALID_OPEN); 1939 PNFS_UPDATE_LAYOUT_INVALID_OPEN);