diff options
Diffstat (limited to 'fs/super.c')
-rw-r--r-- | fs/super.c | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/fs/super.c b/fs/super.c index b05cf47463d0..0902cfa6a12e 100644 --- a/fs/super.c +++ b/fs/super.c | |||
@@ -537,46 +537,6 @@ void drop_super(struct super_block *sb) | |||
537 | EXPORT_SYMBOL(drop_super); | 537 | EXPORT_SYMBOL(drop_super); |
538 | 538 | ||
539 | /** | 539 | /** |
540 | * sync_supers - helper for periodic superblock writeback | ||
541 | * | ||
542 | * Call the write_super method if present on all dirty superblocks in | ||
543 | * the system. This is for the periodic writeback used by most older | ||
544 | * filesystems. For data integrity superblock writeback use | ||
545 | * sync_filesystems() instead. | ||
546 | * | ||
547 | * Note: check the dirty flag before waiting, so we don't | ||
548 | * hold up the sync while mounting a device. (The newly | ||
549 | * mounted device won't need syncing.) | ||
550 | */ | ||
551 | void sync_supers(void) | ||
552 | { | ||
553 | struct super_block *sb, *p = NULL; | ||
554 | |||
555 | spin_lock(&sb_lock); | ||
556 | list_for_each_entry(sb, &super_blocks, s_list) { | ||
557 | if (hlist_unhashed(&sb->s_instances)) | ||
558 | continue; | ||
559 | if (sb->s_op->write_super && sb->s_dirt) { | ||
560 | sb->s_count++; | ||
561 | spin_unlock(&sb_lock); | ||
562 | |||
563 | down_read(&sb->s_umount); | ||
564 | if (sb->s_root && sb->s_dirt && (sb->s_flags & MS_BORN)) | ||
565 | sb->s_op->write_super(sb); | ||
566 | up_read(&sb->s_umount); | ||
567 | |||
568 | spin_lock(&sb_lock); | ||
569 | if (p) | ||
570 | __put_super(p); | ||
571 | p = sb; | ||
572 | } | ||
573 | } | ||
574 | if (p) | ||
575 | __put_super(p); | ||
576 | spin_unlock(&sb_lock); | ||
577 | } | ||
578 | |||
579 | /** | ||
580 | * iterate_supers - call function for all active superblocks | 540 | * iterate_supers - call function for all active superblocks |
581 | * @f: function to call | 541 | * @f: function to call |
582 | * @arg: argument to pass to it | 542 | * @arg: argument to pass to it |