aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Sesterhenn <snakebyte@gmx.de>2006-11-29 23:29:23 -0500
committerAdrian Bunk <bunk@stusta.de>2006-11-29 23:29:23 -0500
commit93e06b4140cc018826bce4d97b0bf7c9ba05ae6e (patch)
tree784cacb45d99f7fc5fe15f378240f1042ae4e495
parentd99c5909859625f3c9c6dfee6caa3b2a7c0ef163 (diff)
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 <snakebyte@gmx.de> Signed-off-by: Adrian Bunk <bunk@stusta.de>
-rw-r--r--fs/aio.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/aio.c b/fs/aio.c
index 94766599db00..277a5f2d18ad 100644
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -367,8 +367,7 @@ void fastcall __put_ioctx(struct kioctx *ctx)
367{ 367{
368 unsigned nr_events = ctx->max_reqs; 368 unsigned nr_events = ctx->max_reqs;
369 369
370 if (unlikely(ctx->reqs_active)) 370 BUG_ON(ctx->reqs_active);
371 BUG();
372 371
373 cancel_delayed_work(&ctx->wq); 372 cancel_delayed_work(&ctx->wq);
374 flush_workqueue(aio_wq); 373 flush_workqueue(aio_wq);
@@ -505,8 +504,7 @@ static int __aio_put_req(struct kioctx *ctx, struct kiocb *req)
505 assert_spin_locked(&ctx->ctx_lock); 504 assert_spin_locked(&ctx->ctx_lock);
506 505
507 req->ki_users --; 506 req->ki_users --;
508 if (unlikely(req->ki_users < 0)) 507 BUG_ON(req->ki_users < 0);
509 BUG();
510 if (likely(req->ki_users)) 508 if (likely(req->ki_users))
511 return 0; 509 return 0;
512 list_del(&req->ki_list); /* remove from active_reqs */ 510 list_del(&req->ki_list); /* remove from active_reqs */