diff options
author | Christoph Hellwig <hch@infradead.org> | 2009-04-27 09:46:42 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2009-06-11 21:36:05 -0400 |
commit | ca41f7b918294c2a17780e057568413dcbfc6d49 (patch) | |
tree | 0f10dbd7e56d5e594802898d744820e551f17cda /fs/ext3/super.c | |
parent | 59d697b70285c348c01cfc2695c3469ba71d7539 (diff) |
ext3: remove ->write_super and stop maintaining ->s_dirt
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/ext3/super.c')
-rw-r--r-- | fs/ext3/super.c | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/fs/ext3/super.c b/fs/ext3/super.c index 3c70d52afb10..1efd958687e9 100644 --- a/fs/ext3/super.c +++ b/fs/ext3/super.c | |||
@@ -67,7 +67,6 @@ static const char *ext3_decode_error(struct super_block * sb, int errno, | |||
67 | static int ext3_remount (struct super_block * sb, int * flags, char * data); | 67 | static int ext3_remount (struct super_block * sb, int * flags, char * data); |
68 | static int ext3_statfs (struct dentry * dentry, struct kstatfs * buf); | 68 | static int ext3_statfs (struct dentry * dentry, struct kstatfs * buf); |
69 | static int ext3_unfreeze(struct super_block *sb); | 69 | static int ext3_unfreeze(struct super_block *sb); |
70 | static void ext3_write_super (struct super_block * sb); | ||
71 | static int ext3_freeze(struct super_block *sb); | 70 | static int ext3_freeze(struct super_block *sb); |
72 | 71 | ||
73 | /* | 72 | /* |
@@ -761,7 +760,6 @@ static const struct super_operations ext3_sops = { | |||
761 | .dirty_inode = ext3_dirty_inode, | 760 | .dirty_inode = ext3_dirty_inode, |
762 | .delete_inode = ext3_delete_inode, | 761 | .delete_inode = ext3_delete_inode, |
763 | .put_super = ext3_put_super, | 762 | .put_super = ext3_put_super, |
764 | .write_super = ext3_write_super, | ||
765 | .sync_fs = ext3_sync_fs, | 763 | .sync_fs = ext3_sync_fs, |
766 | .freeze_fs = ext3_freeze, | 764 | .freeze_fs = ext3_freeze, |
767 | .unfreeze_fs = ext3_unfreeze, | 765 | .unfreeze_fs = ext3_unfreeze, |
@@ -1785,7 +1783,6 @@ static int ext3_fill_super (struct super_block *sb, void *data, int silent) | |||
1785 | #else | 1783 | #else |
1786 | es->s_flags |= cpu_to_le32(EXT2_FLAGS_SIGNED_HASH); | 1784 | es->s_flags |= cpu_to_le32(EXT2_FLAGS_SIGNED_HASH); |
1787 | #endif | 1785 | #endif |
1788 | sb->s_dirt = 1; | ||
1789 | } | 1786 | } |
1790 | 1787 | ||
1791 | if (sbi->s_blocks_per_group > blocksize * 8) { | 1788 | if (sbi->s_blocks_per_group > blocksize * 8) { |
@@ -2265,7 +2262,6 @@ static int ext3_load_journal(struct super_block *sb, | |||
2265 | if (journal_devnum && | 2262 | if (journal_devnum && |
2266 | journal_devnum != le32_to_cpu(es->s_journal_dev)) { | 2263 | journal_devnum != le32_to_cpu(es->s_journal_dev)) { |
2267 | es->s_journal_dev = cpu_to_le32(journal_devnum); | 2264 | es->s_journal_dev = cpu_to_le32(journal_devnum); |
2268 | sb->s_dirt = 1; | ||
2269 | 2265 | ||
2270 | /* Make sure we flush the recovery flag to disk. */ | 2266 | /* Make sure we flush the recovery flag to disk. */ |
2271 | ext3_commit_super(sb, es, 1); | 2267 | ext3_commit_super(sb, es, 1); |
@@ -2308,7 +2304,6 @@ static int ext3_create_journal(struct super_block * sb, | |||
2308 | EXT3_SET_COMPAT_FEATURE(sb, EXT3_FEATURE_COMPAT_HAS_JOURNAL); | 2304 | EXT3_SET_COMPAT_FEATURE(sb, EXT3_FEATURE_COMPAT_HAS_JOURNAL); |
2309 | 2305 | ||
2310 | es->s_journal_inum = cpu_to_le32(journal_inum); | 2306 | es->s_journal_inum = cpu_to_le32(journal_inum); |
2311 | sb->s_dirt = 1; | ||
2312 | 2307 | ||
2313 | /* Make sure we flush the recovery flag to disk. */ | 2308 | /* Make sure we flush the recovery flag to disk. */ |
2314 | ext3_commit_super(sb, es, 1); | 2309 | ext3_commit_super(sb, es, 1); |
@@ -2354,7 +2349,6 @@ static void ext3_mark_recovery_complete(struct super_block * sb, | |||
2354 | if (EXT3_HAS_INCOMPAT_FEATURE(sb, EXT3_FEATURE_INCOMPAT_RECOVER) && | 2349 | if (EXT3_HAS_INCOMPAT_FEATURE(sb, EXT3_FEATURE_INCOMPAT_RECOVER) && |
2355 | sb->s_flags & MS_RDONLY) { | 2350 | sb->s_flags & MS_RDONLY) { |
2356 | EXT3_CLEAR_INCOMPAT_FEATURE(sb, EXT3_FEATURE_INCOMPAT_RECOVER); | 2351 | EXT3_CLEAR_INCOMPAT_FEATURE(sb, EXT3_FEATURE_INCOMPAT_RECOVER); |
2357 | sb->s_dirt = 0; | ||
2358 | ext3_commit_super(sb, es, 1); | 2352 | ext3_commit_super(sb, es, 1); |
2359 | } | 2353 | } |
2360 | unlock_super(sb); | 2354 | unlock_super(sb); |
@@ -2413,29 +2407,14 @@ int ext3_force_commit(struct super_block *sb) | |||
2413 | return 0; | 2407 | return 0; |
2414 | 2408 | ||
2415 | journal = EXT3_SB(sb)->s_journal; | 2409 | journal = EXT3_SB(sb)->s_journal; |
2416 | sb->s_dirt = 0; | ||
2417 | ret = ext3_journal_force_commit(journal); | 2410 | ret = ext3_journal_force_commit(journal); |
2418 | return ret; | 2411 | return ret; |
2419 | } | 2412 | } |
2420 | 2413 | ||
2421 | /* | ||
2422 | * Ext3 always journals updates to the superblock itself, so we don't | ||
2423 | * have to propagate any other updates to the superblock on disk at this | ||
2424 | * point. (We can probably nuke this function altogether, and remove | ||
2425 | * any mention to sb->s_dirt in all of fs/ext3; eventual cleanup...) | ||
2426 | */ | ||
2427 | static void ext3_write_super (struct super_block * sb) | ||
2428 | { | ||
2429 | if (mutex_trylock(&sb->s_lock) != 0) | ||
2430 | BUG(); | ||
2431 | sb->s_dirt = 0; | ||
2432 | } | ||
2433 | |||
2434 | static int ext3_sync_fs(struct super_block *sb, int wait) | 2414 | static int ext3_sync_fs(struct super_block *sb, int wait) |
2435 | { | 2415 | { |
2436 | tid_t target; | 2416 | tid_t target; |
2437 | 2417 | ||
2438 | sb->s_dirt = 0; | ||
2439 | if (journal_start_commit(EXT3_SB(sb)->s_journal, &target)) { | 2418 | if (journal_start_commit(EXT3_SB(sb)->s_journal, &target)) { |
2440 | if (wait) | 2419 | if (wait) |
2441 | log_wait_commit(EXT3_SB(sb)->s_journal, target); | 2420 | log_wait_commit(EXT3_SB(sb)->s_journal, target); |
@@ -2451,7 +2430,6 @@ static int ext3_freeze(struct super_block *sb) | |||
2451 | { | 2430 | { |
2452 | int error = 0; | 2431 | int error = 0; |
2453 | journal_t *journal; | 2432 | journal_t *journal; |
2454 | sb->s_dirt = 0; | ||
2455 | 2433 | ||
2456 | if (!(sb->s_flags & MS_RDONLY)) { | 2434 | if (!(sb->s_flags & MS_RDONLY)) { |
2457 | journal = EXT3_SB(sb)->s_journal; | 2435 | journal = EXT3_SB(sb)->s_journal; |