Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 333141
b: refs/heads/master
c: 01d39ce
h: refs/heads/master
i:
  333139: 9b8659f
v: v3
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Sep 28, 2012
1 parent 0607c86 commit f68277f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 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: 57036a377600ec0900b13f29814aa19072ad3e52
refs/heads/master: 01d39ce82b565961abaf1930f54ccf7b32c96b15
13 changes: 4 additions & 9 deletions trunk/fs/nfs/pnfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -331,11 +331,8 @@ pnfs_layout_remove_lseg(struct pnfs_layout_hdr *lo,

WARN_ON(test_bit(NFS_LSEG_VALID, &lseg->pls_flags));
list_del_init(&lseg->pls_list);
if (list_empty(&lo->plh_segs)) {
if (list_empty(&lo->plh_segs))
set_bit(NFS_LAYOUT_DESTROYED, &lo->plh_flags);
/* Matched by initial refcount set in alloc_init_layout_hdr */
pnfs_put_layout_hdr_locked(lo);
}
rpc_wake_up(&NFS_SERVER(inode)->roc_rpcwaitq);
}

Expand Down Expand Up @@ -468,8 +465,7 @@ pnfs_mark_matching_lsegs_invalid(struct pnfs_layout_hdr *lo,
dprintk("%s:Begin lo %p\n", __func__, lo);

if (list_empty(&lo->plh_segs)) {
if (!test_and_set_bit(NFS_LAYOUT_DESTROYED, &lo->plh_flags))
pnfs_put_layout_hdr_locked(lo);
set_bit(NFS_LAYOUT_DESTROYED, &lo->plh_flags);
return 0;
}
list_for_each_entry_safe(lseg, next, &lo->plh_segs, pls_list)
Expand Down Expand Up @@ -929,8 +925,8 @@ pnfs_find_alloc_layout(struct inode *ino,
if (nfsi->layout) {
if (test_bit(NFS_LAYOUT_DESTROYED, &nfsi->layout->plh_flags))
return NULL;
else
return nfsi->layout;
pnfs_get_layout_hdr(nfsi->layout);
return nfsi->layout;
}
spin_unlock(&ino->i_lock);
new = alloc_init_layout_hdr(ino, ctx, gfp_flags);
Expand Down Expand Up @@ -1129,7 +1125,6 @@ pnfs_update_layout(struct inode *ino,
goto out_unlock;
atomic_inc(&lo->plh_outstanding);

pnfs_get_layout_hdr(lo);
if (list_empty(&lo->plh_segs))
first = true;

Expand Down

0 comments on commit f68277f

Please sign in to comment.