• Tejun Heo's avatar
    block,ide: simplify bdops->set_capacity() to ->unlock_native_capacity() · c3e33e04
    Tejun Heo authored
    bdops->set_capacity() is unnecessarily generic.  All that's required
    is a simple one way notification to lower level driver telling it to
    try to unlock native capacity.  There's no reason to pass in target
    capacity or return the new capacity.  The former is always the
    inherent native capacity and the latter can be handled via the usual
    device resize / revalidation path.  In fact, the current API is always
    used that way.
    
    Replace ->set_capacity() with ->unlock_native_capacity() which take
    only @disk and doesn't return anything.  IDE which is the only current
    user of the API is converted accordingly.
    Signed-off-by: default avatarTejun Heo <tj@kernel.org>
    Cc: Ben Hutchings <ben@decadent.org.uk>
    Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
    Acked-by: default avatarDavid S. Miller <davem@davemloft.net>
    Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
    c3e33e04
check.c 16.8 KB