Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 333211
b: refs/heads/master
c: 038d649
h: refs/heads/master
i:
  333209: f114550
  333207: dc95bb0
v: v3
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Oct 2, 2012
1 parent 630dfee commit 50ff7d6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 251ec410c495cb93c7ae2cb4beda29205d9bd35f
refs/heads/master: 038d6493763d900797dfeb555502d3b0d8103fba
8 changes: 5 additions & 3 deletions trunk/fs/nfs/pnfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@ pnfs_set_layout_stateid(struct pnfs_layout_hdr *lo, const nfs4_stateid *new,

oldseq = be32_to_cpu(lo->plh_stateid.seqid);
newseq = be32_to_cpu(new->seqid);
if ((int)(newseq - oldseq) > 0) {
if (list_empty(&lo->plh_segs) || (int)(newseq - oldseq) > 0) {
nfs4_stateid_copy(&lo->plh_stateid, new);
if (update_barrier) {
u32 new_barrier = be32_to_cpu(new->seqid);
Expand Down Expand Up @@ -1181,6 +1181,10 @@ pnfs_layout_process(struct nfs4_layoutget *lgp)
dprintk("%s forget reply due to state\n", __func__);
goto out_forget_reply;
}

/* Done processing layoutget. Set the layout stateid */
pnfs_set_layout_stateid(lo, &res->stateid, false);

init_lseg(lo, lseg);
lseg->pls_range = res->range;
pnfs_get_lseg(lseg);
Expand All @@ -1191,8 +1195,6 @@ pnfs_layout_process(struct nfs4_layoutget *lgp)
set_bit(NFS_LAYOUT_ROC, &lo->plh_flags);
}

/* Done processing layoutget. Set the layout stateid */
pnfs_set_layout_stateid(lo, &res->stateid, false);
spin_unlock(&ino->i_lock);
return lseg;
out:
Expand Down

0 comments on commit 50ff7d6

Please sign in to comment.