mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 22:21:40 +00:00
sunrpc: handle allocation errors from __rpc_lookup_create()
__rpc_lookup_create() can return ERR_PTR(-ENOMEM). Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> Cc: stable@kernel.org
This commit is contained in:
parent
ff0901f803
commit
f1f0abe192
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user