Commit f1f0abe1 authored by Dan Carpenter's avatar Dan Carpenter Committed by Trond Myklebust

sunrpc: handle allocation errors from __rpc_lookup_create()

__rpc_lookup_create() can return ERR_PTR(-ENOMEM).
Signed-off-by: default avatarDan Carpenter <error27@gmail.com>
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
Cc: stable@kernel.org
parent ff0901f8
...@@ -587,6 +587,8 @@ static struct dentry *__rpc_lookup_create_exclusive(struct dentry *parent, ...@@ -587,6 +587,8 @@ static struct dentry *__rpc_lookup_create_exclusive(struct dentry *parent,
struct dentry *dentry; struct dentry *dentry;
dentry = __rpc_lookup_create(parent, name); dentry = __rpc_lookup_create(parent, name);
if (IS_ERR(dentry))
return dentry;
if (dentry->d_inode == NULL) if (dentry->d_inode == NULL)
return dentry; return dentry;
dput(dentry); dput(dentry);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment