aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-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;