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

Commit 0cdc329e authored by Trond Myklebust's avatar Trond Myklebust
Browse files

pNFS: Skip checking for return-on-close if the layout is invalid

parent e685d237
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1190,7 +1190,8 @@ bool pnfs_roc(struct inode *ino)

	spin_lock(&ino->i_lock);
	lo = nfsi->layout;
	if (!lo || test_bit(NFS_LAYOUT_BULK_RECALL, &lo->plh_flags))
	if (!lo || !pnfs_layout_is_valid(lo) ||
	    test_bit(NFS_LAYOUT_BULK_RECALL, &lo->plh_flags))
		goto out_noroc;

	/* no roc if we hold a delegation */