From: Trond Myklebust Date: Mon, 21 Nov 2016 16:05:33 +0000 (-0500) Subject: pNFS: Skip checking for return-on-close if the layout is invalid X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0cdc329ec9b150c165bcb603c4314b4031b24785;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git pNFS: Skip checking for return-on-close if the layout is invalid Signed-off-by: Trond Myklebust --- 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 */