summaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@hammerspace.com>2019-07-18 15:33:42 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-07-26 09:10:55 +0200
commita09d3e3c3092a97d936a8e90e8f247fafcc7b951 (patch)
tree500b257a71b68bec247f914affc53eb0782454f3 /fs/nfs
parent9cd087dacd8145c832fbb7304435c5f5c3614dc2 (diff)
downloadlinux-stable-a09d3e3c3092a97d936a8e90e8f247fafcc7b951.tar.gz
linux-stable-a09d3e3c3092a97d936a8e90e8f247fafcc7b951.tar.bz2
linux-stable-a09d3e3c3092a97d936a8e90e8f247fafcc7b951.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>
Diffstat (limited to 'fs/nfs')
-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 83722e936b4a..bfe1f4625f60 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -1890,7 +1890,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;