• Yi Li's avatar
    bcache:remove a superfluous check in register_bcache · 117ae250
    Yi Li authored
    There have no reassign the bdev after check It is IS_ERR.
    the double check !IS_ERR(bdev) is superfluous.
    
    After commit 4e7b5671 ("block: remove i_bdev"),
    "Switch the block device lookup interfaces to directly work with a dev_t
    so that struct block_device references are only acquired by the
    blkdev_get variants (and the blk-cgroup special case).  This means that
    we now don't need an extra reference in the inode and can generally
    simplify handling of struct block_device to keep the lookups contained
    in the core block layer code."
    
    so after lookup_bdev call, there no need to do bdput.
    
    remove a superfluous check the bdev & don't call bdput after lookup_bdev.
    
    Fixes: 4e7b5671("block: remove i_bdev")
    Signed-off-by: default avatarYi Li <yili@winhong.com>
    Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
    Signed-off-by: default avatarColy Li <colyli@suse.de>
    Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
    117ae250
super.c 69.6 KB