Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 253933
b: refs/heads/master
c: a2e1d4f
h: refs/heads/master
i:
  253931: a4e623c
v: v3
  • Loading branch information
Fred Isaman authored and Trond Myklebust committed Jun 15, 2011
1 parent 39738d9 commit 7b3d412
Show file tree
Hide file tree
Showing 3 changed files with 10 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: cec765cf5891c7fc3d905832b481bfb6fd55825d
refs/heads/master: a2e1d4f2e5ed83850de92a491ef225824cb457bd
8 changes: 4 additions & 4 deletions trunk/fs/nfs/nfs4proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -5706,6 +5706,7 @@ static void nfs4_layoutreturn_done(struct rpc_task *task, void *calldata)
{
struct nfs4_layoutreturn *lrp = calldata;
struct nfs_server *server;
struct pnfs_layout_hdr *lo = NFS_I(lrp->args.inode)->layout;

dprintk("--> %s\n", __func__);

Expand All @@ -5717,16 +5718,15 @@ static void nfs4_layoutreturn_done(struct rpc_task *task, void *calldata)
nfs_restart_rpc(task, lrp->clp);
return;
}
spin_lock(&lo->plh_inode->i_lock);
if (task->tk_status == 0) {
struct pnfs_layout_hdr *lo = NFS_I(lrp->args.inode)->layout;

if (lrp->res.lrs_present) {
spin_lock(&lo->plh_inode->i_lock);
pnfs_set_layout_stateid(lo, &lrp->res.stateid, true);
spin_unlock(&lo->plh_inode->i_lock);
} else
BUG_ON(!list_empty(&lo->plh_segs));
}
lo->plh_block_lgets--;
spin_unlock(&lo->plh_inode->i_lock);
dprintk("<-- %s\n", __func__);
}

Expand Down
8 changes: 5 additions & 3 deletions trunk/fs/nfs/pnfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -634,12 +634,14 @@ _pnfs_return_layout(struct inode *ino)

spin_lock(&ino->i_lock);
lo = nfsi->layout;
if (!lo || !mark_matching_lsegs_invalid(lo, &tmp_list, NULL)) {
if (!lo) {
spin_unlock(&ino->i_lock);
dprintk("%s: no layout segments to return\n", __func__);
goto out;
dprintk("%s: no layout to return\n", __func__);
return status;
}
stateid = nfsi->layout->plh_stateid;
mark_matching_lsegs_invalid(lo, &tmp_list, NULL);
lo->plh_block_lgets++;
/* Reference matched in nfs4_layoutreturn_release */
get_layout_hdr(lo);
spin_unlock(&ino->i_lock);
Expand Down

0 comments on commit 7b3d412

Please sign in to comment.