]> err.no Git - linux-2.6/blobdiff - fs/aio.c
Merge branch 'for-linus4' of master.kernel.org:/pub/scm/linux/kernel/git/viro/bird
[linux-2.6] / fs / aio.c
index 2e0d1505ee367c4cd7d3169c9b7a08b8fedaa930..277a5f2d18ad7b8ca66a3aef65551379054fc724 100644 (file)
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -367,8 +367,7 @@ void fastcall __put_ioctx(struct kioctx *ctx)
 {
        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 *ctx, struct kiocb *req)
        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 */
@@ -675,7 +673,7 @@ static ssize_t aio_run_iocb(struct kiocb *iocb)
        }
 
        if (!(iocb->ki_retried & 0xff)) {
-               pr_debug("%ld retry: %d of %d\n", iocb->ki_retried,
+               pr_debug("%ld retry: %zd of %zd\n", iocb->ki_retried,
                        iocb->ki_nbytes - iocb->ki_left, iocb->ki_nbytes);
        }
 
@@ -1008,7 +1006,7 @@ int fastcall aio_complete(struct kiocb *iocb, long res, long res2)
 
        pr_debug("added to ring %p at [%lu]\n", iocb, tail);
 
-       pr_debug("%ld retries: %d of %d\n", iocb->ki_retried,
+       pr_debug("%ld retries: %zd of %zd\n", iocb->ki_retried,
                iocb->ki_nbytes - iocb->ki_left, iocb->ki_nbytes);
 put_rq:
        /* everything turned out well, dispose of the aiocb. */