aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ubifs
diff options
context:
space:
mode:
authorAdrian Hunter <ext-adrian.hunter@nokia.com>2009-01-29 04:17:24 -0500
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2009-01-29 09:15:39 -0500
commit3eb14297c4b85af0c5e6605e18d93b6031330d71 (patch)
treea029c57515d69fafeddbe60f43b6eb1f6f29c7f0 /fs/ubifs
parent4a29d2005b0f28d018d36d209c47f3973a725df5 (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')
-rw-r--r--fs/ubifs/super.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c
index dbfc88714716..3ddd754262b4 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)
451 return 0; 451 return 0;
452 452
453 /* 453 /*
454 * Synchronize write buffers, because 'ubifs_run_commit()' does not
455 * do this if it waits for an already running commit.
456 */
457 for (i = 0; i < c->jhead_cnt; i++) {
458 err = ubifs_wbuf_sync(&c->jheads[i].wbuf);
459 if (err)
460 return err;
461 }
462
463 /*
464 * VFS calls '->sync_fs()' before synchronizing all dirty inodes and 454 * VFS calls '->sync_fs()' before synchronizing all dirty inodes and
465 * pages, so synchronize them first, then commit the journal. Strictly 455 * pages, so synchronize them first, then commit the journal. Strictly
466 * speaking, it is not necessary to commit the journal here, 456 * 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)
471 */ 461 */
472 generic_sync_sb_inodes(sb, &wbc); 462 generic_sync_sb_inodes(sb, &wbc);
473 463
464 /*
465 * Synchronize write buffers, because 'ubifs_run_commit()' does not
466 * do this if it waits for an already running commit.
467 */
468 for (i = 0; i < c->jhead_cnt; i++) {
469 err = ubifs_wbuf_sync(&c->jheads[i].wbuf);
470 if (err)
471 return err;
472 }
473
474 err = ubifs_run_commit(c); 474 err = ubifs_run_commit(c);
475 if (err) 475 if (err)
476 return err; 476 return err;