projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8e0acf9
)
pNFS: Always update the layout stateid if NFS_LAYOUT_INVALID_STID is set
author
Trond Myklebust
<trond.myklebust@primarydata.com>
Sun, 24 Jul 2016 15:39:03 +0000
(11:39 -0400)
committer
Trond Myklebust
<trond.myklebust@primarydata.com>
Sun, 24 Jul 2016 20:16:25 +0000
(16:16 -0400)
If the layout stateid is invalid, then pnfs_set_layout_stateid() must
always initialise it.
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
fs/nfs/pnfs.c
patch
|
blob
|
history
diff --git
a/fs/nfs/pnfs.c
b/fs/nfs/pnfs.c
index dcccded1aeedabe428850ee35f2f9f54b6df768c..eef844785bc6920ecaf0e3696b56c74292372651 100644
(file)
--- 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);