projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
264a047
)
bsg: simplify __bsg_alloc_command failpath
author
FUJITA Tomonori
<fujita.tomonori@lab.ntt.co.jp>
Wed, 24 Jan 2007 08:05:54 +0000
(09:05 +0100)
committer
Jens Axboe
<jens.axboe@oracle.com>
Mon, 16 Jul 2007 06:52:45 +0000
(08:52 +0200)
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
block/bsg.c
patch
|
blob
|
blame
|
history
diff --git
a/block/bsg.c
b/block/bsg.c
index e97e3ec08ffc482c0a785c092258b90151685c6a..c85d961ee41ebf58335768542051313b49a73868 100644
(file)
--- a/
block/bsg.c
+++ b/
block/bsg.c
@@
-128,7
+128,8
@@
static struct bsg_command *__bsg_alloc_command(struct bsg_device *bd)
bc = kmem_cache_alloc(bsg_cmd_cachep, GFP_USER);
if (unlikely(!bc)) {
spin_lock_irq(&bd->lock);
- goto alloc_fail;
+ bd->queued_cmds--;
+ goto out;
}
memset(bc, 0, sizeof(*bc));
@@
-136,8
+137,6
@@
static struct bsg_command *__bsg_alloc_command(struct bsg_device *bd)
INIT_LIST_HEAD(&bc->list);
dprintk("%s: returning free cmd %p\n", bd->name, bc);
return bc;
-alloc_fail:
- bd->queued_cmds--;
out:
spin_unlock_irq(&bd->lock);
return bc;