diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-07-29 19:15:18 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-07-29 19:15:18 -0700 |
commit | 91a5698d1f253d30f53f0c58d2504eaec481b854 (patch) | |
tree | 684d8060e16b33c6ede5b814dbd459e0c5cb1f39 /fs | |
parent | 084bad91afd0f40ff4db9ceb56e29234c314d8d1 (diff) | |
parent | dddac6a7b445de95515f64fdf82fe5dc36c02f26 (diff) |
Merge branch 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6
* 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6:
PM / Hibernate: Replace bdget call with simple atomic_inc of i_count
PM / ACPI: HP G7000 Notebook needs a SCI_EN resume quirk
Diffstat (limited to 'fs')
-rw-r--r-- | fs/block_dev.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/block_dev.c b/fs/block_dev.c index 3a6d4fb2a32..94dfda24c06 100644 --- a/fs/block_dev.c +++ b/fs/block_dev.c @@ -564,6 +564,16 @@ struct block_device *bdget(dev_t dev) EXPORT_SYMBOL(bdget); +/** + * bdgrab -- Grab a reference to an already referenced block device + * @bdev: Block device to grab a reference to. + */ +struct block_device *bdgrab(struct block_device *bdev) +{ + atomic_inc(&bdev->bd_inode->i_count); + return bdev; +} + long nr_blockdev_pages(void) { struct block_device *bdev; |