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 | |
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')
-rw-r--r-- | fs/ext3/balloc.c | 3 | ||||
-rw-r--r-- | fs/ext3/ialloc.c | 3 | ||||
-rw-r--r-- | fs/ext3/inode.c | 1 | ||||
-rw-r--r-- | fs/ext3/resize.c | 2 | ||||
-rw-r--r-- | fs/ext3/super.c | 22 | ||||
-rw-r--r-- | fs/ext3/xattr.c | 1 |
6 files changed, 2 insertions, 30 deletions
diff --git a/fs/ext3/balloc.c b/fs/ext3/balloc.c index 225202db8974..27967f92e820 100644 --- a/fs/ext3/balloc.c +++ b/fs/ext3/balloc.c | |||
@@ -649,7 +649,7 @@ do_more: | |||
649 | count = overflow; | 649 | count = overflow; |
650 | goto do_more; | 650 | goto do_more; |
651 | } | 651 | } |
652 | sb->s_dirt = 1; | 652 | |
653 | error_return: | 653 | error_return: |
654 | brelse(bitmap_bh); | 654 | brelse(bitmap_bh); |
655 | ext3_std_error(sb, err); | 655 | ext3_std_error(sb, err); |
@@ -1708,7 +1708,6 @@ allocated: | |||
1708 | if (!fatal) | 1708 | if (!fatal) |
1709 | fatal = err; | 1709 | fatal = err; |
1710 | 1710 | ||
1711 | sb->s_dirt = 1; | ||
1712 | if (fatal) | 1711 | if (fatal) |
1713 | goto out; | 1712 | goto out; |
1714 | 1713 | ||
diff --git a/fs/ext3/ialloc.c b/fs/ext3/ialloc.c index dd13d60d524b..b39991285136 100644 --- a/fs/ext3/ialloc.c +++ b/fs/ext3/ialloc.c | |||
@@ -181,7 +181,7 @@ void ext3_free_inode (handle_t *handle, struct inode * inode) | |||
181 | err = ext3_journal_dirty_metadata(handle, bitmap_bh); | 181 | err = ext3_journal_dirty_metadata(handle, bitmap_bh); |
182 | if (!fatal) | 182 | if (!fatal) |
183 | fatal = err; | 183 | fatal = err; |
184 | sb->s_dirt = 1; | 184 | |
185 | error_return: | 185 | error_return: |
186 | brelse(bitmap_bh); | 186 | brelse(bitmap_bh); |
187 | ext3_std_error(sb, fatal); | 187 | ext3_std_error(sb, fatal); |
@@ -537,7 +537,6 @@ got: | |||
537 | percpu_counter_dec(&sbi->s_freeinodes_counter); | 537 | percpu_counter_dec(&sbi->s_freeinodes_counter); |
538 | if (S_ISDIR(mode)) | 538 | if (S_ISDIR(mode)) |
539 | percpu_counter_inc(&sbi->s_dirs_counter); | 539 | percpu_counter_inc(&sbi->s_dirs_counter); |
540 | sb->s_dirt = 1; | ||
541 | 540 | ||
542 | inode->i_uid = current_fsuid(); | 541 | inode->i_uid = current_fsuid(); |
543 | if (test_opt (sb, GRPID)) | 542 | if (test_opt (sb, GRPID)) |
diff --git a/fs/ext3/inode.c b/fs/ext3/inode.c index fcfa24361856..b0248c6d5d4c 100644 --- a/fs/ext3/inode.c +++ b/fs/ext3/inode.c | |||
@@ -2960,7 +2960,6 @@ static int ext3_do_update_inode(handle_t *handle, | |||
2960 | ext3_update_dynamic_rev(sb); | 2960 | ext3_update_dynamic_rev(sb); |
2961 | EXT3_SET_RO_COMPAT_FEATURE(sb, | 2961 | EXT3_SET_RO_COMPAT_FEATURE(sb, |
2962 | EXT3_FEATURE_RO_COMPAT_LARGE_FILE); | 2962 | EXT3_FEATURE_RO_COMPAT_LARGE_FILE); |
2963 | sb->s_dirt = 1; | ||
2964 | handle->h_sync = 1; | 2963 | handle->h_sync = 1; |
2965 | err = ext3_journal_dirty_metadata(handle, | 2964 | err = ext3_journal_dirty_metadata(handle, |
2966 | EXT3_SB(sb)->s_sbh); | 2965 | EXT3_SB(sb)->s_sbh); |
diff --git a/fs/ext3/resize.c b/fs/ext3/resize.c index 78fdf3836370..8a0b26340b54 100644 --- a/fs/ext3/resize.c +++ b/fs/ext3/resize.c | |||
@@ -934,7 +934,6 @@ int ext3_group_add(struct super_block *sb, struct ext3_new_group_data *input) | |||
934 | EXT3_INODES_PER_GROUP(sb)); | 934 | EXT3_INODES_PER_GROUP(sb)); |
935 | 935 | ||
936 | ext3_journal_dirty_metadata(handle, sbi->s_sbh); | 936 | ext3_journal_dirty_metadata(handle, sbi->s_sbh); |
937 | sb->s_dirt = 1; | ||
938 | 937 | ||
939 | exit_journal: | 938 | exit_journal: |
940 | unlock_super(sb); | 939 | unlock_super(sb); |
@@ -1066,7 +1065,6 @@ int ext3_group_extend(struct super_block *sb, struct ext3_super_block *es, | |||
1066 | } | 1065 | } |
1067 | es->s_blocks_count = cpu_to_le32(o_blocks_count + add); | 1066 | es->s_blocks_count = cpu_to_le32(o_blocks_count + add); |
1068 | ext3_journal_dirty_metadata(handle, EXT3_SB(sb)->s_sbh); | 1067 | ext3_journal_dirty_metadata(handle, EXT3_SB(sb)->s_sbh); |
1069 | sb->s_dirt = 1; | ||
1070 | unlock_super(sb); | 1068 | unlock_super(sb); |
1071 | ext3_debug("freeing blocks %lu through "E3FSBLK"\n", o_blocks_count, | 1069 | ext3_debug("freeing blocks %lu through "E3FSBLK"\n", o_blocks_count, |
1072 | o_blocks_count + add); | 1070 | o_blocks_count + add); |
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; |
diff --git a/fs/ext3/xattr.c b/fs/ext3/xattr.c index 83b7be849bd5..545e37c4b91e 100644 --- a/fs/ext3/xattr.c +++ b/fs/ext3/xattr.c | |||
@@ -463,7 +463,6 @@ static void ext3_xattr_update_super_block(handle_t *handle, | |||
463 | 463 | ||
464 | if (ext3_journal_get_write_access(handle, EXT3_SB(sb)->s_sbh) == 0) { | 464 | if (ext3_journal_get_write_access(handle, EXT3_SB(sb)->s_sbh) == 0) { |
465 | EXT3_SET_COMPAT_FEATURE(sb, EXT3_FEATURE_COMPAT_EXT_ATTR); | 465 | EXT3_SET_COMPAT_FEATURE(sb, EXT3_FEATURE_COMPAT_EXT_ATTR); |
466 | sb->s_dirt = 1; | ||
467 | ext3_journal_dirty_metadata(handle, EXT3_SB(sb)->s_sbh); | 466 | ext3_journal_dirty_metadata(handle, EXT3_SB(sb)->s_sbh); |
468 | } | 467 | } |
469 | } | 468 | } |