From: Trond Myklebust Date: Tue, 12 Mar 2019 20:04:51 +0000 (-0400) Subject: pNFS: Fix a typo in pnfs_update_layout X-Git-Tag: v4.19.61~71 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f64ff5914f00f51882da9cdc269f067d7b82a774;p=platform%2Fkernel%2Flinux-rpi.git pNFS: Fix a typo in pnfs_update_layout commit 400417b05f3ec0531544ca5f94e64d838d8b8849 upstream. We're supposed to wait for the outstanding layout count to go to zero, but that got lost somehow. Fixes: d03360aaf5cca ("pNFS: Ensure we return the error if someone...") Reported-by: Anna Schumaker Signed-off-by: Trond Myklebust Signed-off-by: Greg Kroah-Hartman --- diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c index 7d9a51e..1aa628c 100644 --- a/fs/nfs/pnfs.c +++ b/fs/nfs/pnfs.c @@ -1866,7 +1866,7 @@ lookup_again: atomic_read(&lo->plh_outstanding) != 0) { spin_unlock(&ino->i_lock); lseg = ERR_PTR(wait_var_event_killable(&lo->plh_outstanding, - atomic_read(&lo->plh_outstanding))); + !atomic_read(&lo->plh_outstanding))); if (IS_ERR(lseg) || !list_empty(&lo->plh_segs)) goto out_put_layout_hdr; pnfs_put_layout_hdr(lo);