diff options
author | Adrian Hunter <ext-adrian.hunter@nokia.com> | 2009-01-29 11:17:24 +0200 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2009-01-29 16:15:39 +0200 |
commit | 3eb14297c4b85af0c5e6605e18d93b6031330d71 (patch) | |
tree | a029c57515d69fafeddbe60f43b6eb1f6f29c7f0 /fs/ubifs/super.c | |
parent | 4a29d2005b0f28d018d36d209c47f3973a725df5 (diff) |
UBIFS: sync wbufs after syncing inodes and pages
All writes go through wbufs so they must be sync'd
after syncing inodes and pages.
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'fs/ubifs/super.c')
-rw-r--r-- | fs/ubifs/super.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c index dbfc8871471..3ddd754262b 100644 --- a/fs/ubifs/super.c +++ b/fs/ubifs/super.c @@ -451,16 +451,6 @@ static int ubifs_sync_fs(struct super_block *sb, int wait) return 0; /* - * Synchronize write buffers, because 'ubifs_run_commit()' does not - * do this if it waits for an already running commit. - */ - for (i = 0; i < c->jhead_cnt; i++) { - err = ubifs_wbuf_sync(&c->jheads[i].wbuf); - if (err) - return err; - } - - /* * VFS calls '->sync_fs()' before synchronizing all dirty inodes and * pages, so synchronize them first, then commit the journal. Strictly * speaking, it is not necessary to commit the journal here, @@ -471,6 +461,16 @@ static int ubifs_sync_fs(struct super_block *sb, int wait) */ generic_sync_sb_inodes(sb, &wbc); + /* + * Synchronize write buffers, because 'ubifs_run_commit()' does not + * do this if it waits for an already running commit. + */ + for (i = 0; i < c->jhead_cnt; i++) { + err = ubifs_wbuf_sync(&c->jheads[i].wbuf); + if (err) + return err; + } + err = ubifs_run_commit(c); if (err) return err; |