Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 333210
b: refs/heads/master
c: 251ec41
h: refs/heads/master
v: v3
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Oct 2, 2012
1 parent f114550 commit 630dfee
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 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: ae2bb03236fc978bdf673c19d39832500793b83c
refs/heads/master: 251ec410c495cb93c7ae2cb4beda29205d9bd35f
15 changes: 8 additions & 7 deletions trunk/fs/nfs/pnfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -907,18 +907,19 @@ pnfs_find_alloc_layout(struct inode *ino,

dprintk("%s Begin ino=%p layout=%p\n", __func__, ino, nfsi->layout);

if (nfsi->layout) {
pnfs_get_layout_hdr(nfsi->layout);
return nfsi->layout;
}
if (nfsi->layout != NULL)
goto out_existing;
spin_unlock(&ino->i_lock);
new = alloc_init_layout_hdr(ino, ctx, gfp_flags);
spin_lock(&ino->i_lock);

if (likely(nfsi->layout == NULL)) /* Won the race? */
if (likely(nfsi->layout == NULL)) { /* Won the race? */
nfsi->layout = new;
else
pnfs_free_layout_hdr(new);
return new;
}
pnfs_free_layout_hdr(new);
out_existing:
pnfs_get_layout_hdr(nfsi->layout);
return nfsi->layout;
}

Expand Down

0 comments on commit 630dfee

Please sign in to comment.