NFSv4.1: _pnfs_return_layout() shouldn't invalidate the layout on failure
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>
This commit is contained in:
parent
e5929f3cff
commit
65857d5768
@ -718,8 +718,9 @@ _pnfs_return_layout(struct inode *ino)
|
|||||||
lrp = kzalloc(sizeof(*lrp), GFP_KERNEL);
|
lrp = kzalloc(sizeof(*lrp), GFP_KERNEL);
|
||||||
if (unlikely(lrp == NULL)) {
|
if (unlikely(lrp == NULL)) {
|
||||||
status = -ENOMEM;
|
status = -ENOMEM;
|
||||||
pnfs_layout_io_set_failed(lo, IOMODE_RW);
|
spin_lock(&ino->i_lock);
|
||||||
pnfs_layout_io_set_failed(lo, IOMODE_READ);
|
lo->plh_block_lgets--;
|
||||||
|
spin_unlock(&ino->i_lock);
|
||||||
pnfs_put_layout_hdr(lo);
|
pnfs_put_layout_hdr(lo);
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user