diff options
author | NeilBrown <neilb@suse.de> | 2012-08-01 06:40:02 -0400 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2012-08-01 06:40:02 -0400 |
commit | bb181e2e48f8c85db08c9cb015cbba9618dbf05c (patch) | |
tree | 191bc24dd97bcb174535cc217af082f16da3b43d /fs/sysv/inode.c | |
parent | d57368afe63b3b7b45ce6c2b8c5276417935be2f (diff) | |
parent | c039c332f23e794deb6d6f37b9f07ff3b27fb2cf (diff) |
Merge commit 'c039c332f23e794deb6d6f37b9f07ff3b27fb2cf' into md
Pull in pre-requisites for adding raid10 support to dm-raid.
Diffstat (limited to 'fs/sysv/inode.c')
-rw-r--r-- | fs/sysv/inode.c | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/fs/sysv/inode.c b/fs/sysv/inode.c index 08d0b2568cd3..80e1e2b18df1 100644 --- a/fs/sysv/inode.c +++ b/fs/sysv/inode.c | |||
@@ -43,7 +43,6 @@ static int sysv_sync_fs(struct super_block *sb, int wait) | |||
43 | * then attach current time stamp. | 43 | * then attach current time stamp. |
44 | * But if the filesystem was marked clean, keep it clean. | 44 | * But if the filesystem was marked clean, keep it clean. |
45 | */ | 45 | */ |
46 | sb->s_dirt = 0; | ||
47 | old_time = fs32_to_cpu(sbi, *sbi->s_sb_time); | 46 | old_time = fs32_to_cpu(sbi, *sbi->s_sb_time); |
48 | if (sbi->s_type == FSTYPE_SYSV4) { | 47 | if (sbi->s_type == FSTYPE_SYSV4) { |
49 | if (*sbi->s_sb_state == cpu_to_fs32(sbi, 0x7c269d38 - old_time)) | 48 | if (*sbi->s_sb_state == cpu_to_fs32(sbi, 0x7c269d38 - old_time)) |
@@ -57,23 +56,12 @@ static int sysv_sync_fs(struct super_block *sb, int wait) | |||
57 | return 0; | 56 | return 0; |
58 | } | 57 | } |
59 | 58 | ||
60 | static void sysv_write_super(struct super_block *sb) | ||
61 | { | ||
62 | if (!(sb->s_flags & MS_RDONLY)) | ||
63 | sysv_sync_fs(sb, 1); | ||
64 | else | ||
65 | sb->s_dirt = 0; | ||
66 | } | ||
67 | |||
68 | static int sysv_remount(struct super_block *sb, int *flags, char *data) | 59 | static int sysv_remount(struct super_block *sb, int *flags, char *data) |
69 | { | 60 | { |
70 | struct sysv_sb_info *sbi = SYSV_SB(sb); | 61 | struct sysv_sb_info *sbi = SYSV_SB(sb); |
71 | lock_super(sb); | 62 | |
72 | if (sbi->s_forced_ro) | 63 | if (sbi->s_forced_ro) |
73 | *flags |= MS_RDONLY; | 64 | *flags |= MS_RDONLY; |
74 | if (*flags & MS_RDONLY) | ||
75 | sysv_write_super(sb); | ||
76 | unlock_super(sb); | ||
77 | return 0; | 65 | return 0; |
78 | } | 66 | } |
79 | 67 | ||
@@ -81,9 +69,6 @@ static void sysv_put_super(struct super_block *sb) | |||
81 | { | 69 | { |
82 | struct sysv_sb_info *sbi = SYSV_SB(sb); | 70 | struct sysv_sb_info *sbi = SYSV_SB(sb); |
83 | 71 | ||
84 | if (sb->s_dirt) | ||
85 | sysv_write_super(sb); | ||
86 | |||
87 | if (!(sb->s_flags & MS_RDONLY)) { | 72 | if (!(sb->s_flags & MS_RDONLY)) { |
88 | /* XXX ext2 also updates the state here */ | 73 | /* XXX ext2 also updates the state here */ |
89 | mark_buffer_dirty(sbi->s_bh1); | 74 | mark_buffer_dirty(sbi->s_bh1); |
@@ -357,7 +342,6 @@ const struct super_operations sysv_sops = { | |||
357 | .write_inode = sysv_write_inode, | 342 | .write_inode = sysv_write_inode, |
358 | .evict_inode = sysv_evict_inode, | 343 | .evict_inode = sysv_evict_inode, |
359 | .put_super = sysv_put_super, | 344 | .put_super = sysv_put_super, |
360 | .write_super = sysv_write_super, | ||
361 | .sync_fs = sysv_sync_fs, | 345 | .sync_fs = sysv_sync_fs, |
362 | .remount_fs = sysv_remount, | 346 | .remount_fs = sysv_remount, |
363 | .statfs = sysv_statfs, | 347 | .statfs = sysv_statfs, |