diff options
Diffstat (limited to 'fs/sysv')
-rw-r--r-- | fs/sysv/inode.c | 18 | ||||
-rw-r--r-- | fs/sysv/namei.c | 4 | ||||
-rw-r--r-- | fs/sysv/sysv.h | 1 |
3 files changed, 3 insertions, 20 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, |
diff --git a/fs/sysv/namei.c b/fs/sysv/namei.c index d7466e293614..1c0d5f264767 100644 --- a/fs/sysv/namei.c +++ b/fs/sysv/namei.c | |||
@@ -43,7 +43,7 @@ const struct dentry_operations sysv_dentry_operations = { | |||
43 | .d_hash = sysv_hash, | 43 | .d_hash = sysv_hash, |
44 | }; | 44 | }; |
45 | 45 | ||
46 | static struct dentry *sysv_lookup(struct inode * dir, struct dentry * dentry, struct nameidata *nd) | 46 | static struct dentry *sysv_lookup(struct inode * dir, struct dentry * dentry, unsigned int flags) |
47 | { | 47 | { |
48 | struct inode * inode = NULL; | 48 | struct inode * inode = NULL; |
49 | ino_t ino; | 49 | ino_t ino; |
@@ -80,7 +80,7 @@ static int sysv_mknod(struct inode * dir, struct dentry * dentry, umode_t mode, | |||
80 | return err; | 80 | return err; |
81 | } | 81 | } |
82 | 82 | ||
83 | static int sysv_create(struct inode * dir, struct dentry * dentry, umode_t mode, struct nameidata *nd) | 83 | static int sysv_create(struct inode * dir, struct dentry * dentry, umode_t mode, bool excl) |
84 | { | 84 | { |
85 | return sysv_mknod(dir, dentry, mode, 0); | 85 | return sysv_mknod(dir, dentry, mode, 0); |
86 | } | 86 | } |
diff --git a/fs/sysv/sysv.h b/fs/sysv/sysv.h index 11b07672f6c5..0bc35fdc58e2 100644 --- a/fs/sysv/sysv.h +++ b/fs/sysv/sysv.h | |||
@@ -117,7 +117,6 @@ static inline void dirty_sb(struct super_block *sb) | |||
117 | mark_buffer_dirty(sbi->s_bh1); | 117 | mark_buffer_dirty(sbi->s_bh1); |
118 | if (sbi->s_bh1 != sbi->s_bh2) | 118 | if (sbi->s_bh1 != sbi->s_bh2) |
119 | mark_buffer_dirty(sbi->s_bh2); | 119 | mark_buffer_dirty(sbi->s_bh2); |
120 | sb->s_dirt = 1; | ||
121 | } | 120 | } |
122 | 121 | ||
123 | 122 | ||