提交 65857d57 编写于 作者: T Trond Myklebust

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: NTrond Myklebust <Trond.Myklebust@netapp.com>
上级 e5929f3c
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册