summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTrond Myklebust2019-07-18 21:33:42 +0200
committerGreg Kroah-Hartman2019-07-26 09:14:23 +0200
commit0b174bac4e43d9de3e46df5165dd59f98a955cd9 (patch)
tree55884e26c2ecd91bcfa99d239265f192a852f147
parentpNFS: Fix a typo in pnfs_update_layout (diff)
downloadkernel-qcow2-linux-0b174bac4e43d9de3e46df5165dd59f98a955cd9.tar.gz
kernel-qcow2-linux-0b174bac4e43d9de3e46df5165dd59f98a955cd9.tar.xz
kernel-qcow2-linux-0b174bac4e43d9de3e46df5165dd59f98a955cd9.zip
pnfs: Fix a problem where we gratuitously start doing I/O through the MDS
commit 58bbeab425c6c5e318f5b6ae31d351331ddfb34b upstream. If the client has to stop in pnfs_update_layout() to wait for another layoutget to complete, it currently exits and defaults to I/O through the MDS if the layoutget was successful. Fixes: d03360aaf5cc ("pNFS: Ensure we return the error if someone kills...") Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com> Cc: stable@vger.kernel.org # v4.20+ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--fs/nfs/pnfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index 1aa628c98966..4931c3a75f03 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -1867,7 +1867,7 @@ lookup_again:
spin_unlock(&ino->i_lock);
lseg = ERR_PTR(wait_var_event_killable(&lo->plh_outstanding,
!atomic_read(&lo->plh_outstanding)));
- if (IS_ERR(lseg) || !list_empty(&lo->plh_segs))
+ if (IS_ERR(lseg))
goto out_put_layout_hdr;
pnfs_put_layout_hdr(lo);
goto lookup_again;