提交 f1f0abe1 编写于 作者: D Dan Carpenter 提交者: Trond Myklebust

sunrpc: handle allocation errors from __rpc_lookup_create()

__rpc_lookup_create() can return ERR_PTR(-ENOMEM).
Signed-off-by: NDan Carpenter <error27@gmail.com>
Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
Cc: stable@kernel.org
上级 ff0901f8
......@@ -587,6 +587,8 @@ static struct dentry *__rpc_lookup_create_exclusive(struct dentry *parent,
struct dentry *dentry;
dentry = __rpc_lookup_create(parent, name);
if (IS_ERR(dentry))
return dentry;
if (dentry->d_inode == NULL)
return dentry;
dput(dentry);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册