Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=93e06b4140cc018826bce4d97b0bf7c9ba05ae6e
Commit:     93e06b4140cc018826bce4d97b0bf7c9ba05ae6e
Parent:     d99c5909859625f3c9c6dfee6caa3b2a7c0ef163
Author:     Eric Sesterhenn <[EMAIL PROTECTED]>
AuthorDate: Thu Nov 30 05:29:23 2006 +0100
Committer:  Adrian Bunk <[EMAIL PROTECTED]>
CommitDate: Thu Nov 30 05:29:23 2006 +0100

    BUG_ON conversion for fs/aio.c
    
    This patch converts a if () BUG(); construct to BUG_ON();
    which occupies less space, uses unlikely and is safer when
    BUG() is disabled.
    
    Signed-off-by: Eric Sesterhenn <[EMAIL PROTECTED]>
    Signed-off-by: Adrian Bunk <[EMAIL PROTECTED]>
---
 fs/aio.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/fs/aio.c b/fs/aio.c
index 9476659..277a5f2 100644
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -367,8 +367,7 @@ void fastcall __put_ioctx(struct kioctx
 {
        unsigned nr_events = ctx->max_reqs;
 
-       if (unlikely(ctx->reqs_active))
-               BUG();
+       BUG_ON(ctx->reqs_active);
 
        cancel_delayed_work(&ctx->wq);
        flush_workqueue(aio_wq);
@@ -505,8 +504,7 @@ static int __aio_put_req(struct kioctx *
        assert_spin_locked(&ctx->ctx_lock);
 
        req->ki_users --;
-       if (unlikely(req->ki_users < 0))
-               BUG();
+       BUG_ON(req->ki_users < 0);
        if (likely(req->ki_users))
                return 0;
        list_del(&req->ki_list);                /* remove from active_reqs */
-
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