aboutsummaryrefslogtreecommitdiffstats
path: root/fs/affs/super.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/affs/super.c')
-rw-r--r--fs/affs/super.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/fs/affs/super.c b/fs/affs/super.c
index c837e43687a6..4ceec5636434 100644
--- a/fs/affs/super.c
+++ b/fs/affs/super.c
@@ -31,11 +31,13 @@ affs_commit_super(struct super_block *sb, int wait)
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 lock_super(sb);
34 secs_to_datestamp(get_seconds(), &tail->disk_change); 35 secs_to_datestamp(get_seconds(), &tail->disk_change);
35 affs_fix_checksum(sb, bh); 36 affs_fix_checksum(sb, bh);
36 mark_buffer_dirty(bh); 37 mark_buffer_dirty(bh);
37 if (wait) 38 if (wait)
38 sync_dirty_buffer(bh); 39 sync_dirty_buffer(bh);
40 unlock_super(sb);
39} 41}
40 42
41static void 43static void
@@ -54,22 +56,17 @@ affs_put_super(struct super_block *sb)
54static void 56static void
55affs_write_super(struct super_block *sb) 57affs_write_super(struct super_block *sb)
56{ 58{
57 lock_super(sb);
58 if (!(sb->s_flags & MS_RDONLY)) 59 if (!(sb->s_flags & MS_RDONLY))
59 affs_commit_super(sb, 1); 60 affs_commit_super(sb, 1);
60 sb->s_dirt = 0; 61 sb->s_dirt = 0;
61 unlock_super(sb);
62
63 pr_debug("AFFS: write_super() at %lu, clean=2\n", get_seconds()); 62 pr_debug("AFFS: write_super() at %lu, clean=2\n", get_seconds());
64} 63}
65 64
66static int 65static int
67affs_sync_fs(struct super_block *sb, int wait) 66affs_sync_fs(struct super_block *sb, int wait)
68{ 67{
69 lock_super(sb);
70 affs_commit_super(sb, wait); 68 affs_commit_super(sb, wait);
71 sb->s_dirt = 0; 69 sb->s_dirt = 0;
72 unlock_super(sb);
73 return 0; 70 return 0;
74} 71}
75 72