From c63d22ff37ae5d1aff8b07820d3825d1888ddeed Mon Sep 17 00:00:00 2001 From: Artem Bityutskiy Date: Mon, 20 Jul 2009 17:56:19 +0300 Subject: [PATCH] --- yaml --- r: 164049 b: refs/heads/master c: 887ee17117fd23e962332b353d250ac9e090b20f h: refs/heads/master i: 164047: 25b7cd46dda5050349776e0c6e957529470bef29 v: v3 --- [refs] | 2 +- trunk/fs/ubifs/super.c | 24 +++++++----------------- 2 files changed, 8 insertions(+), 18 deletions(-) diff --git a/[refs] b/[refs] index 144b66e8ce5a..b1cc14ea327a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: e9d6bbc428bdf0c08bbd0b3f28db2b7317cfff21 +refs/heads/master: 887ee17117fd23e962332b353d250ac9e090b20f diff --git a/trunk/fs/ubifs/super.c b/trunk/fs/ubifs/super.c index 13e7ed4188ea..b541bd75bd1f 100644 --- a/trunk/fs/ubifs/super.c +++ b/trunk/fs/ubifs/super.c @@ -437,12 +437,6 @@ static int ubifs_sync_fs(struct super_block *sb, int wait) { int i, err; struct ubifs_info *c = sb->s_fs_info; - struct writeback_control wbc = { - .sync_mode = WB_SYNC_ALL, - .range_start = 0, - .range_end = LLONG_MAX, - .nr_to_write = LONG_MAX, - }; /* * Zero @wait is just an advisory thing to help the file system shove @@ -452,17 +446,6 @@ static int ubifs_sync_fs(struct super_block *sb, int wait) if (!wait) return 0; - /* - * 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, - * synchronizing write-buffers would be enough. But committing makes - * UBIFS free space predictions much more accurate, so we want to let - * the user be able to get more accurate results of 'statfs()' after - * they synchronize the file system. - */ - 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. @@ -473,6 +456,13 @@ static int ubifs_sync_fs(struct super_block *sb, int wait) return err; } + /* + * Strictly speaking, it is not necessary to commit the journal here, + * synchronizing write-buffers would be enough. But committing makes + * UBIFS free space predictions much more accurate, so we want to let + * the user be able to get more accurate results of 'statfs()' after + * they synchronize the file system. + */ err = ubifs_run_commit(c); if (err) return err;