Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bdebfccd authored by Trond Myklebust's avatar Trond Myklebust
Browse files

pNFS: Ensure we check layout validity before marking it for return



pnfs_error_mark_layout_for_return needs to check that the layout is
valid before calling pnfs_set_plh_return_info().

Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
parent 88bd4f86
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -2049,6 +2049,10 @@ void pnfs_error_mark_layout_for_return(struct inode *inode,
	bool return_now = false;

	spin_lock(&inode->i_lock);
	if (!pnfs_layout_is_valid(lo)) {
		spin_unlock(&inode->i_lock);
		return;
	}
	pnfs_set_plh_return_info(lo, range.iomode, 0);
	/* Block LAYOUTGET */
	set_bit(NFS_LAYOUT_RETURN, &lo->plh_flags);