pNFS: Fix a typo in pnfs_update_layout
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Tue, 12 Mar 2019 20:04:51 +0000 (16:04 -0400)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Tue, 12 Mar 2019 20:04:51 +0000 (16:04 -0400)
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 <Anna.Schumaker@Netapp.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
fs/nfs/pnfs.c

index 8247bd1634cb8c80bee4e4658a2e9754a0ebbf8b..7066cd7c7aff33eff193ce22e7eb28c6a39abecb 100644 (file)
@@ -1889,7 +1889,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);