Commit ca41f7b918294c2a17780e057568413dcbfc6d49
Committed by
Al Viro
1 parent
59d697b702
Exists in
master
and in
7 other branches
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>
Showing 6 changed files with 2 additions and 30 deletions Side-by-side Diff
fs/ext3/balloc.c
... | ... | @@ -649,7 +649,7 @@ |
649 | 649 | count = overflow; |
650 | 650 | goto do_more; |
651 | 651 | } |
652 | - sb->s_dirt = 1; | |
652 | + | |
653 | 653 | error_return: |
654 | 654 | brelse(bitmap_bh); |
655 | 655 | ext3_std_error(sb, err); |
... | ... | @@ -1708,7 +1708,6 @@ |
1708 | 1708 | if (!fatal) |
1709 | 1709 | fatal = err; |
1710 | 1710 | |
1711 | - sb->s_dirt = 1; | |
1712 | 1711 | if (fatal) |
1713 | 1712 | goto out; |
1714 | 1713 |
fs/ext3/ialloc.c
... | ... | @@ -181,7 +181,7 @@ |
181 | 181 | err = ext3_journal_dirty_metadata(handle, bitmap_bh); |
182 | 182 | if (!fatal) |
183 | 183 | fatal = err; |
184 | - sb->s_dirt = 1; | |
184 | + | |
185 | 185 | error_return: |
186 | 186 | brelse(bitmap_bh); |
187 | 187 | ext3_std_error(sb, fatal); |
... | ... | @@ -537,7 +537,6 @@ |
537 | 537 | percpu_counter_dec(&sbi->s_freeinodes_counter); |
538 | 538 | if (S_ISDIR(mode)) |
539 | 539 | percpu_counter_inc(&sbi->s_dirs_counter); |
540 | - sb->s_dirt = 1; | |
541 | 540 | |
542 | 541 | inode->i_uid = current_fsuid(); |
543 | 542 | if (test_opt (sb, GRPID)) |
fs/ext3/inode.c
fs/ext3/resize.c
... | ... | @@ -934,7 +934,6 @@ |
934 | 934 | EXT3_INODES_PER_GROUP(sb)); |
935 | 935 | |
936 | 936 | ext3_journal_dirty_metadata(handle, sbi->s_sbh); |
937 | - sb->s_dirt = 1; | |
938 | 937 | |
939 | 938 | exit_journal: |
940 | 939 | unlock_super(sb); |
... | ... | @@ -1066,7 +1065,6 @@ |
1066 | 1065 | } |
1067 | 1066 | es->s_blocks_count = cpu_to_le32(o_blocks_count + add); |
1068 | 1067 | ext3_journal_dirty_metadata(handle, EXT3_SB(sb)->s_sbh); |
1069 | - sb->s_dirt = 1; | |
1070 | 1068 | unlock_super(sb); |
1071 | 1069 | ext3_debug("freeing blocks %lu through "E3FSBLK"\n", o_blocks_count, |
1072 | 1070 | o_blocks_count + add); |
fs/ext3/super.c
... | ... | @@ -67,7 +67,6 @@ |
67 | 67 | static int ext3_remount (struct super_block * sb, int * flags, char * data); |
68 | 68 | static int ext3_statfs (struct dentry * dentry, struct kstatfs * buf); |
69 | 69 | static int ext3_unfreeze(struct super_block *sb); |
70 | -static void ext3_write_super (struct super_block * sb); | |
71 | 70 | static int ext3_freeze(struct super_block *sb); |
72 | 71 | |
73 | 72 | /* |
... | ... | @@ -761,7 +760,6 @@ |
761 | 760 | .dirty_inode = ext3_dirty_inode, |
762 | 761 | .delete_inode = ext3_delete_inode, |
763 | 762 | .put_super = ext3_put_super, |
764 | - .write_super = ext3_write_super, | |
765 | 763 | .sync_fs = ext3_sync_fs, |
766 | 764 | .freeze_fs = ext3_freeze, |
767 | 765 | .unfreeze_fs = ext3_unfreeze, |
... | ... | @@ -1785,7 +1783,6 @@ |
1785 | 1783 | #else |
1786 | 1784 | es->s_flags |= cpu_to_le32(EXT2_FLAGS_SIGNED_HASH); |
1787 | 1785 | #endif |
1788 | - sb->s_dirt = 1; | |
1789 | 1786 | } |
1790 | 1787 | |
1791 | 1788 | if (sbi->s_blocks_per_group > blocksize * 8) { |
... | ... | @@ -2265,7 +2262,6 @@ |
2265 | 2262 | if (journal_devnum && |
2266 | 2263 | journal_devnum != le32_to_cpu(es->s_journal_dev)) { |
2267 | 2264 | es->s_journal_dev = cpu_to_le32(journal_devnum); |
2268 | - sb->s_dirt = 1; | |
2269 | 2265 | |
2270 | 2266 | /* Make sure we flush the recovery flag to disk. */ |
2271 | 2267 | ext3_commit_super(sb, es, 1); |
... | ... | @@ -2308,7 +2304,6 @@ |
2308 | 2304 | EXT3_SET_COMPAT_FEATURE(sb, EXT3_FEATURE_COMPAT_HAS_JOURNAL); |
2309 | 2305 | |
2310 | 2306 | es->s_journal_inum = cpu_to_le32(journal_inum); |
2311 | - sb->s_dirt = 1; | |
2312 | 2307 | |
2313 | 2308 | /* Make sure we flush the recovery flag to disk. */ |
2314 | 2309 | ext3_commit_super(sb, es, 1); |
... | ... | @@ -2354,7 +2349,6 @@ |
2354 | 2349 | if (EXT3_HAS_INCOMPAT_FEATURE(sb, EXT3_FEATURE_INCOMPAT_RECOVER) && |
2355 | 2350 | sb->s_flags & MS_RDONLY) { |
2356 | 2351 | EXT3_CLEAR_INCOMPAT_FEATURE(sb, EXT3_FEATURE_INCOMPAT_RECOVER); |
2357 | - sb->s_dirt = 0; | |
2358 | 2352 | ext3_commit_super(sb, es, 1); |
2359 | 2353 | } |
2360 | 2354 | unlock_super(sb); |
2361 | 2355 | |
2362 | 2356 | |
... | ... | @@ -2413,29 +2407,14 @@ |
2413 | 2407 | return 0; |
2414 | 2408 | |
2415 | 2409 | journal = EXT3_SB(sb)->s_journal; |
2416 | - sb->s_dirt = 0; | |
2417 | 2410 | ret = ext3_journal_force_commit(journal); |
2418 | 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 | 2414 | static int ext3_sync_fs(struct super_block *sb, int wait) |
2435 | 2415 | { |
2436 | 2416 | tid_t target; |
2437 | 2417 | |
2438 | - sb->s_dirt = 0; | |
2439 | 2418 | if (journal_start_commit(EXT3_SB(sb)->s_journal, &target)) { |
2440 | 2419 | if (wait) |
2441 | 2420 | log_wait_commit(EXT3_SB(sb)->s_journal, target); |
... | ... | @@ -2451,7 +2430,6 @@ |
2451 | 2430 | { |
2452 | 2431 | int error = 0; |
2453 | 2432 | journal_t *journal; |
2454 | - sb->s_dirt = 0; | |
2455 | 2433 | |
2456 | 2434 | if (!(sb->s_flags & MS_RDONLY)) { |
2457 | 2435 | journal = EXT3_SB(sb)->s_journal; |
fs/ext3/xattr.c