Skip to content

Commit

Permalink
NFSv4.1: _pnfs_return_layout() shouldn't invalidate the layout on fai…
Browse files Browse the repository at this point in the history
…lure

Failure of the layoutreturn allocation fails is not a good reason to
mark the pnfs_layout_hdr as having failed a layoutget or i/o. Just
exit cleanly.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Sep 28, 2012
1 parent e5929f3 commit 65857d5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions fs/nfs/pnfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -718,8 +718,9 @@ _pnfs_return_layout(struct inode *ino)
lrp = kzalloc(sizeof(*lrp), GFP_KERNEL);
if (unlikely(lrp == NULL)) {
status = -ENOMEM;
pnfs_layout_io_set_failed(lo, IOMODE_RW);
pnfs_layout_io_set_failed(lo, IOMODE_READ);
spin_lock(&ino->i_lock);
lo->plh_block_lgets--;
spin_unlock(&ino->i_lock);
pnfs_put_layout_hdr(lo);
goto out;
}
Expand Down

0 comments on commit 65857d5

Please sign in to comment.