[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4DAD773B.3060602@kernel.dk>
Date: Tue, 19 Apr 2011 13:51:23 +0200
From: Jens Axboe <axboe@...nel.dk>
To: Tao Ma <tm@....ma>
CC: linux-kernel@...r.kernel.org
Subject: Re: [PATCH] block: Remove the extra check in queue_requests_store.
On 2011-04-19 10:26, Tao Ma wrote:
> From: Tao Ma <boyu.mt@...bao.com>
>
> In queue_requests_store, the code looks like
> if (rl->count[BLK_RW_SYNC] >= q->nr_requests) {
> blk_set_queue_full(q, BLK_RW_SYNC);
> } else if (rl->count[BLK_RW_SYNC]+1 <= q->nr_requests) {
> blk_clear_queue_full(q, BLK_RW_SYNC);
> wake_up(&rl->wait[BLK_RW_SYNC]);
> }
> If we don't satify the situation of "if", we can get that
> rl->count[BLK_RW_SYNC} < q->nr_quests. It is the same as
> rl->count[BLK_RW_SYNC]+1 <= q->nr_requests.
> All the "else" should satisfy the "else if" check so it isn't
> needed actually.
Thanks, applied.
--
Jens Axboe
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists