diff options
| author | Christoph Hellwig <hch@sgi.com> | 2003-01-14 20:56:36 -0800 |
|---|---|---|
| committer | Christoph Hellwig <hch@lst.de> | 2003-01-14 20:56:36 -0800 |
| commit | bae9a1941b59f70c765b84e94347528083021866 (patch) | |
| tree | b41f5472828d0574b7eeb77264c312bda361de38 /include/linux | |
| parent | 298d8a0447c3d1ca65d929702ddb86b32b6e34b4 (diff) | |
[PATCH] stale bdev reference in quotactl
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.
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/fs.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index eabad3faeee7..595ea1af33fd 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -1098,6 +1098,7 @@ extern inline const char *bdevname(struct block_device *bdev) { return __bdevname(bdev->bd_dev); } +extern struct block_device *lookup_bdev(const char *); extern struct block_device *open_bdev_excl(const char *, int, int, void *); extern void close_bdev_excl(struct block_device *, int); |
