aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/affs/super.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/affs/super.c b/fs/affs/super.c
index 0782653a05a2..1d42e468abdd 100644
--- a/fs/affs/super.c
+++ b/fs/affs/super.c
@@ -25,13 +25,12 @@ static int affs_statfs(struct dentry *dentry, struct kstatfs *buf);
25static int affs_remount (struct super_block *sb, int *flags, char *data); 25static int affs_remount (struct super_block *sb, int *flags, char *data);
26 26
27static void 27static void
28affs_commit_super(struct super_block *sb, int wait, int clean) 28affs_commit_super(struct super_block *sb, int wait)
29{ 29{
30 struct affs_sb_info *sbi = AFFS_SB(sb); 30 struct affs_sb_info *sbi = AFFS_SB(sb);
31 struct buffer_head *bh = sbi->s_root_bh; 31 struct buffer_head *bh = sbi->s_root_bh;
32 struct affs_root_tail *tail = AFFS_ROOT_TAIL(sb, bh); 32 struct affs_root_tail *tail = AFFS_ROOT_TAIL(sb, bh);
33 33
34 tail->bm_flag = cpu_to_be32(clean);
35 secs_to_datestamp(get_seconds(), &tail->disk_change); 34 secs_to_datestamp(get_seconds(), &tail->disk_change);
36 affs_fix_checksum(sb, bh); 35 affs_fix_checksum(sb, bh);
37 mark_buffer_dirty(bh); 36 mark_buffer_dirty(bh);
@@ -46,7 +45,7 @@ affs_put_super(struct super_block *sb)
46 pr_debug("AFFS: put_super()\n"); 45 pr_debug("AFFS: put_super()\n");
47 46
48 if (!(sb->s_flags & MS_RDONLY) && sb->s_dirt) 47 if (!(sb->s_flags & MS_RDONLY) && sb->s_dirt)
49 affs_commit_super(sb, 1, 1); 48 affs_commit_super(sb, 1);
50 49
51 kfree(sbi->s_prefix); 50 kfree(sbi->s_prefix);
52 affs_free_bitmap(sb); 51 affs_free_bitmap(sb);
@@ -60,7 +59,7 @@ affs_write_super(struct super_block *sb)
60{ 59{
61 lock_super(sb); 60 lock_super(sb);
62 if (!(sb->s_flags & MS_RDONLY)) 61 if (!(sb->s_flags & MS_RDONLY))
63 affs_commit_super(sb, 1, 2); 62 affs_commit_super(sb, 1);
64 sb->s_dirt = 0; 63 sb->s_dirt = 0;
65 unlock_super(sb); 64 unlock_super(sb);
66 65
@@ -71,7 +70,7 @@ static int
71affs_sync_fs(struct super_block *sb, int wait) 70affs_sync_fs(struct super_block *sb, int wait)
72{ 71{
73 lock_super(sb); 72 lock_super(sb);
74 affs_commit_super(sb, wait, 2); 73 affs_commit_super(sb, wait);
75 sb->s_dirt = 0; 74 sb->s_dirt = 0;
76 unlock_super(sb); 75 unlock_super(sb);
77 return 0; 76 return 0;