Skip to content

Commit 58bbeab

Browse files
author
Trond Myklebust
committed
pnfs: Fix a problem where we gratuitously start doing I/O through the MDS
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: d03360a ("pNFS: Ensure we return the error if someone kills...") Signed-off-by: Trond Myklebust <[email protected]> Cc: [email protected] # v4.20+
1 parent f554af2 commit 58bbeab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/nfs/pnfs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1890,7 +1890,7 @@ pnfs_update_layout(struct inode *ino,
18901890
spin_unlock(&ino->i_lock);
18911891
lseg = ERR_PTR(wait_var_event_killable(&lo->plh_outstanding,
18921892
!atomic_read(&lo->plh_outstanding)));
1893-
if (IS_ERR(lseg) || !list_empty(&lo->plh_segs))
1893+
if (IS_ERR(lseg))
18941894
goto out_put_layout_hdr;
18951895
pnfs_put_layout_hdr(lo);
18961896
goto lookup_again;

0 commit comments

Comments
 (0)