提交 1ed3a853 编写于 作者: B Benny Halevy 提交者: Trond Myklebust

NFSv4.1: need to put_layout_hdr on _pnfs_return_layout error path

We always get a reference on the layout header and we rely on
nfs4_layoutreturn_release to put it.  If we hit an allocation error
before starting the rpc proc we bail out early without dereferncing
the layout header properly.
Signed-off-by: NBenny Halevy <benny@tonian.com>
Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
上级 c7fd0622
......@@ -652,6 +652,7 @@ _pnfs_return_layout(struct inode *ino)
lrp = kzalloc(sizeof(*lrp), GFP_KERNEL);
if (unlikely(lrp == NULL)) {
status = -ENOMEM;
put_layout_hdr(lo);
goto out;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册