Skip to content

Commit

Permalink
pNFS: Skip checking for return-on-close if the layout is invalid
Browse files Browse the repository at this point in the history
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
  • Loading branch information
Trond Myklebust committed Dec 1, 2016
1 parent e685d23 commit 0cdc329
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs/nfs/pnfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 0cdc329

Please sign in to comment.