Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7e75d73080d822d2bbbd5b0f7f293719dd1f9109
Commit:     7e75d73080d822d2bbbd5b0f7f293719dd1f9109
Parent:     264a0472183ce7ad05eea3360f5907880a1e5e78
Author:     FUJITA Tomonori <[EMAIL PROTECTED]>
AuthorDate: Wed Jan 24 09:05:54 2007 +0100
Committer:  Jens Axboe <[EMAIL PROTECTED]>
CommitDate: Mon Jul 16 08:52:45 2007 +0200

    bsg: simplify __bsg_alloc_command failpath
    
    Signed-off-by: FUJITA Tomonori <[EMAIL PROTECTED]>
    Signed-off-by: Jens Axboe <[EMAIL PROTECTED]>
---
 block/bsg.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/block/bsg.c b/block/bsg.c
index e97e3ec..c85d961 100644
--- 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;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to