Skip to contentSkip to conversation

sunrpc: handle allocation errors from __rpc_lookup_create()

PATCH In review Dan Carpenter 2 participants 2 messages Mar 21, 2010

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sunrpc: handle allocation errors from __rpc_lookup_create()

__rpc_lookup_create() can return ERR_PTR(-ENOMEM).

net/sunrpc/rpc_pipe.c +2 -0
index 8d63f8f..20e30c6 100644
@@ -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);

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html