projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bb34ed2
)
ocfs2: one function call less in user_cluster_connect() after error detection
author
Markus Elfring
<
[email protected]
>
Tue, 14 Apr 2015 22:42:59 +0000
(15:42 -0700)
committer
Linus Torvalds
<
[email protected]
>
Tue, 14 Apr 2015 23:48:57 +0000
(16:48 -0700)
kfree() was called by user_cluster_connect() even if a previous call of
the kzalloc() function failed.
Return from this implementation directly after failure detection.
Signed-off-by: Markus Elfring <
[email protected]
>
Cc: Mark Fasheh <
[email protected]
>
Cc: Joel Becker <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
fs/ocfs2/stack_user.c
patch
|
blob
|
history
diff --git
a/fs/ocfs2/stack_user.c
b/fs/ocfs2/stack_user.c
index c3b7807c65d6f72812a9bfa6512a0e9e705d3165..2768eb1da2b865f4afba3c35087da7c477c87309 100644
(file)
--- a/
fs/ocfs2/stack_user.c
+++ b/
fs/ocfs2/stack_user.c
@@
-1004,10
+1004,8
@@
static int user_cluster_connect(struct ocfs2_cluster_connection *conn)
BUG_ON(conn == NULL);
lc = kzalloc(sizeof(struct ocfs2_live_connection), GFP_KERNEL);
- if (!lc) {
- rc = -ENOMEM;
- goto out;
- }
+ if (!lc)
+ return -ENOMEM;
init_waitqueue_head(&lc->oc_wait);
init_completion(&lc->oc_sync_wait);