• Christoph Hellwig's avatar
    [PATCH] stale bdev reference in quotactl · bae9a194
    Christoph Hellwig authored
    sys_quotacl tries to do a get_super on a struct block_device * to which
    it doesn't hold a reference (nor does it actually have to be non-NULL).
    
    As lookup bdev by name is a rather common operation I splitted out a new
    helper, lookup_bdev() that does this out of open_bdev_excl and switched
    quota.c to use it.  lookup_bdev() holds a proper reference that needs
    to be dropped by bdput(), and it's well documented.
    bae9a194
block_dev.c 20.5 KB