• Alan Stern's avatar
    Block: fix unbalanced bypass-disable in blk_register_queue · df35c7c9
    Alan Stern authored
    When a queue is registered, the block layer turns off the bypass
    setting (because bypass is enabled when the queue is created).  This
    doesn't work well for queues that are unregistered and then registered
    again; we get a WARNING because of the unbalanced calls to
    blk_queue_bypass_end().
    
    This patch fixes the problem by making blk_register_queue() call
    blk_queue_bypass_end() only the first time the queue is registered.
    Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
    Acked-by: default avatarTejun Heo <tj@kernel.org>
    CC: James Bottomley <James.Bottomley@HansenPartnership.com>
    CC: Jens Axboe <axboe@kernel.dk>
    Signed-off-by: default avatarJens Axboe <axboe@fb.com>
    df35c7c9
blk-sysfs.c 15.1 KB