summaryrefslogtreecommitdiffstats
path: root/fs/hpfs
diff options
context:
space:
mode:
authorMikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>2011-05-08 20:43:41 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2011-05-09 09:04:24 -0700
commitf73976818adeaa46515a238b21e865850b011a87 (patch)
tree0039a4bf88de3416c47b299b385f89e8850e3439 /fs/hpfs
parentd878597c2c498b63abe3e68d343459944bc358f9 (diff)
downloadop-kernel-dev-f73976818adeaa46515a238b21e865850b011a87.zip
op-kernel-dev-f73976818adeaa46515a238b21e865850b011a87.tar.gz
HPFS: When marking or clearing the dirty bit, sync the filesystem
When marking or clearing the dirty bit, sync the filesystem Signed-off-by: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/hpfs')
-rw-r--r--fs/hpfs/super.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/hpfs/super.c b/fs/hpfs/super.c
index 4858ff8..07e8d0c 100644
--- a/fs/hpfs/super.c
+++ b/fs/hpfs/super.c
@@ -27,6 +27,7 @@ static void mark_dirty(struct super_block *s)
sb->dirty = 1;
sb->old_wrote = 0;
mark_buffer_dirty(bh);
+ sync_dirty_buffer(bh);
brelse(bh);
}
}
@@ -40,10 +41,12 @@ static void unmark_dirty(struct super_block *s)
struct buffer_head *bh;
struct hpfs_spare_block *sb;
if (s->s_flags & MS_RDONLY) return;
+ sync_blockdev(s->s_bdev);
if ((sb = hpfs_map_sector(s, 17, &bh, 0))) {
sb->dirty = hpfs_sb(s)->sb_chkdsk > 1 - hpfs_sb(s)->sb_was_error;
sb->old_wrote = hpfs_sb(s)->sb_chkdsk >= 2 && !hpfs_sb(s)->sb_was_error;
mark_buffer_dirty(bh);
+ sync_dirty_buffer(bh);
brelse(bh);
}
}
OpenPOWER on IntegriCloud