diff options
author | Ingo Molnar <mingo@elte.hu> | 2012-03-05 03:20:08 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2012-03-05 03:20:08 -0500 |
commit | 737f24bda723fdf89ecaacb99fa2bf5683c32799 (patch) | |
tree | 35495fff3e9956679cb5468e74e6814c8e44ee66 /fs/super.c | |
parent | 8eedce996556d7d06522cd3a0e6069141c8dffe0 (diff) | |
parent | b7c924274c456499264d1cfa3d44063bb11eb5db (diff) |
Merge branch 'perf/urgent' into perf/core
Conflicts:
tools/perf/builtin-record.c
tools/perf/builtin-top.c
tools/perf/perf.h
tools/perf/util/top.h
Merge reason: resolve these cherry-picking conflicts.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'fs/super.c')
-rw-r--r-- | fs/super.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/fs/super.c b/fs/super.c index 6015c02296b7..6277ec6cb60a 100644 --- a/fs/super.c +++ b/fs/super.c | |||
@@ -634,6 +634,28 @@ rescan: | |||
634 | EXPORT_SYMBOL(get_super); | 634 | EXPORT_SYMBOL(get_super); |
635 | 635 | ||
636 | /** | 636 | /** |
637 | * get_super_thawed - get thawed superblock of a device | ||
638 | * @bdev: device to get the superblock for | ||
639 | * | ||
640 | * Scans the superblock list and finds the superblock of the file system | ||
641 | * mounted on the device. The superblock is returned once it is thawed | ||
642 | * (or immediately if it was not frozen). %NULL is returned if no match | ||
643 | * is found. | ||
644 | */ | ||
645 | struct super_block *get_super_thawed(struct block_device *bdev) | ||
646 | { | ||
647 | while (1) { | ||
648 | struct super_block *s = get_super(bdev); | ||
649 | if (!s || s->s_frozen == SB_UNFROZEN) | ||
650 | return s; | ||
651 | up_read(&s->s_umount); | ||
652 | vfs_check_frozen(s, SB_FREEZE_WRITE); | ||
653 | put_super(s); | ||
654 | } | ||
655 | } | ||
656 | EXPORT_SYMBOL(get_super_thawed); | ||
657 | |||
658 | /** | ||
637 | * get_active_super - get an active reference to the superblock of a device | 659 | * get_active_super - get an active reference to the superblock of a device |
638 | * @bdev: device to get the superblock for | 660 | * @bdev: device to get the superblock for |
639 | * | 661 | * |