diff options
author | Dan Carpenter <error27@gmail.com> | 2010-03-21 12:10:34 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2010-03-22 05:34:13 -0400 |
commit | f1f0abe192a72e75d7c59972e30784d043fd8d73 (patch) | |
tree | ec805bee0fea179ad4b5e8a3d09e3ee0914a4186 /net/sunrpc/rpc_pipe.c | |
parent | ff0901f8036a1586037c30a365c9666e946af0f1 (diff) |
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
Diffstat (limited to 'net/sunrpc/rpc_pipe.c')
-rw-r--r-- | net/sunrpc/rpc_pipe.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/sunrpc/rpc_pipe.c b/net/sunrpc/rpc_pipe.c index 8d63f8fd29b7..20e30c6f8355 100644 --- a/net/sunrpc/rpc_pipe.c +++ b/net/sunrpc/rpc_pipe.c | |||
@@ -587,6 +587,8 @@ static struct dentry *__rpc_lookup_create_exclusive(struct dentry *parent, | |||
587 | struct dentry *dentry; | 587 | struct dentry *dentry; |
588 | 588 | ||
589 | dentry = __rpc_lookup_create(parent, name); | 589 | dentry = __rpc_lookup_create(parent, name); |
590 | if (IS_ERR(dentry)) | ||
591 | return dentry; | ||
590 | if (dentry->d_inode == NULL) | 592 | if (dentry->d_inode == NULL) |
591 | return dentry; | 593 | return dentry; |
592 | dput(dentry); | 594 | dput(dentry); |