aboutsummaryrefslogtreecommitdiff
path: root/fs/nfs/pnfs.c
diff options
context:
space:
mode:
authorGravatar Trond Myklebust <trond.myklebust@primarydata.com> 2016-07-24 11:39:03 -0400
committerGravatar Trond Myklebust <trond.myklebust@primarydata.com> 2016-07-24 16:16:25 -0400
commit13bede18de41e2cfe8f67c1cd8b6d10be42ef473 (patch)
treecd2b5ff352075c581f74b86b493ec05834cc2206 /fs/nfs/pnfs.c
parentpNFS: Clear the layout return tracking on layout reinitialisation (diff)
downloadlinux-13bede18de41e2cfe8f67c1cd8b6d10be42ef473.tar.gz
linux-13bede18de41e2cfe8f67c1cd8b6d10be42ef473.tar.bz2
linux-13bede18de41e2cfe8f67c1cd8b6d10be42ef473.zip
pNFS: Always update the layout stateid if NFS_LAYOUT_INVALID_STID is set
If the layout stateid is invalid, then pnfs_set_layout_stateid() must always initialise it. Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'fs/nfs/pnfs.c')
-rw-r--r--fs/nfs/pnfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index dcccded1aeed..eef844785bc6 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -762,7 +762,7 @@ pnfs_set_layout_stateid(struct pnfs_layout_hdr *lo, const nfs4_stateid *new,
bool update_barrier)
{
u32 oldseq, newseq, new_barrier;
- int empty = list_empty(&lo->plh_segs);
+ bool empty = !pnfs_layout_is_valid(lo);
oldseq = be32_to_cpu(lo->plh_stateid.seqid);
newseq = be32_to_cpu(new->seqid);