aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/pnfs.c
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@primarydata.com>2016-11-21 11:05:33 -0500
committerTrond Myklebust <trond.myklebust@primarydata.com>2016-12-01 17:21:44 -0500
commit0cdc329ec9b150c165bcb603c4314b4031b24785 (patch)
tree06ff9380d9a07522f29670f42ded0956b4618a7f /fs/nfs/pnfs.c
parentpNFS: Remove spurious wake up in pnfs_layout_remove_lseg() (diff)
downloadlinux-dev-0cdc329ec9b150c165bcb603c4314b4031b24785.tar.xz
linux-dev-0cdc329ec9b150c165bcb603c4314b4031b24785.zip
pNFS: Skip checking for return-on-close if the layout is invalid
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'fs/nfs/pnfs.c')
-rw-r--r--fs/nfs/pnfs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index a64d1e40dba9..330f3a012f8e 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -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 */