• Peter Zijlstra's avatar
    block: Simplify bsg complete all · 2c561246
    Peter Zijlstra authored
    It took me a few tries to figure out what this code did; lets rewrite
    it into a more regular form.
    The thing that makes this one 'special' is the BSG_F_BLOCK flag, if
    that is not set we're not supposed/allowed to block and should spin
    wait for completion.
    The (new) io_wait_event() will never see a false condition in case of
    the spinning and we will therefore not block.
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
    Signed-off-by: default avatarJens Axboe <axboe@fb.com>
bsg.c 22.9 KB