diff options
author | Theodore Ts'o <tytso@mit.edu> | 2009-01-03 09:47:09 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2009-01-03 09:47:09 -0500 |
commit | 87d8fe1ee6b8d2f95076142d58c440dba4e7bdc2 (patch) | |
tree | 8c91506978a16c22268b086f693e307de0ca57db /fs/super.c | |
parent | 0087d9fb3f29f59e8d42c8b058376d80e5adde4c (diff) |
add releasepage hooks to block devices which can be used by file systems
Implement blkdev_releasepage() to release the buffer_heads and pages
after we release private data belonging to a mounted filesystem.
Cc: Toshiyuki Okajima <toshi.okajima@jp.fujitsu.com>
Cc: linux-fsdevel@vger.kernel.org
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/super.c')
-rw-r--r-- | fs/super.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/super.c b/fs/super.c index ddba069d7a99..d5fd4498548a 100644 --- a/fs/super.c +++ b/fs/super.c | |||
@@ -800,6 +800,7 @@ int get_sb_bdev(struct file_system_type *fs_type, | |||
800 | } | 800 | } |
801 | 801 | ||
802 | s->s_flags |= MS_ACTIVE; | 802 | s->s_flags |= MS_ACTIVE; |
803 | bdev->bd_super = s; | ||
803 | } | 804 | } |
804 | 805 | ||
805 | return simple_set_mnt(mnt, s); | 806 | return simple_set_mnt(mnt, s); |
@@ -819,6 +820,7 @@ void kill_block_super(struct super_block *sb) | |||
819 | struct block_device *bdev = sb->s_bdev; | 820 | struct block_device *bdev = sb->s_bdev; |
820 | fmode_t mode = sb->s_mode; | 821 | fmode_t mode = sb->s_mode; |
821 | 822 | ||
823 | bdev->bd_super = 0; | ||
822 | generic_shutdown_super(sb); | 824 | generic_shutdown_super(sb); |
823 | sync_blockdev(bdev); | 825 | sync_blockdev(bdev); |
824 | close_bdev_exclusive(bdev, mode); | 826 | close_bdev_exclusive(bdev, mode); |