block: fix synchronization and limit check in blk_alloc_devt()