aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/pnfs.h
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@primarydata.com>2016-07-24 12:26:34 -0400
committerTrond Myklebust <trond.myklebust@primarydata.com>2016-07-24 12:51:49 -0400
commit45fcc7bca7004687e9ba28e08b3dfb6787a0b466 (patch)
treeed5f90b361769a5f664ae94cf262e420279790fa /fs/nfs/pnfs.h
parentMerge commit 'e7bdea7750eb' (diff)
downloadlinux-dev-45fcc7bca7004687e9ba28e08b3dfb6787a0b466.tar.xz
linux-dev-45fcc7bca7004687e9ba28e08b3dfb6787a0b466.zip
pNFS: LAYOUTRETURN should only update the stateid if the layout is valid
If the layout was completely returned, then ignore the returned layout stateid. Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'fs/nfs/pnfs.h')
-rw-r--r--fs/nfs/pnfs.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/nfs/pnfs.h b/fs/nfs/pnfs.h
index b21bd0bee784..2f4f26905c03 100644
--- a/fs/nfs/pnfs.h
+++ b/fs/nfs/pnfs.h
@@ -375,6 +375,11 @@ static inline bool nfs_have_layout(struct inode *inode)
return NFS_I(inode)->layout != NULL;
}
+static inline bool pnfs_layout_is_valid(const struct pnfs_layout_hdr *lo)
+{
+ return test_bit(NFS_LAYOUT_INVALID_STID, &lo->plh_flags) == 0;
+}
+
static inline struct nfs4_deviceid_node *
nfs4_get_deviceid(struct nfs4_deviceid_node *d)
{