summaryrefslogtreecommitdiffstats
path: root/fs/ubifs
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2009-07-20 17:56:19 +0300
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2009-07-24 15:14:55 +0300
commit887ee17117fd23e962332b353d250ac9e090b20f (patch)
treeb871a984fe5ed99b9181846d3f89b67b92239023 /fs/ubifs
parente9d6bbc428bdf0c08bbd0b3f28db2b7317cfff21 (diff)
downloadop-kernel-dev-887ee17117fd23e962332b353d250ac9e090b20f.zip
op-kernel-dev-887ee17117fd23e962332b353d250ac9e090b20f.tar.gz
UBIFS: remove unneeded call from ubifs_sync_fs
Nowadays VFS always synchronizes all dirty inodes and pages before calling '->sync_fs()', so remove unneeded 'generic_sync_sb_inodes()' from 'ubifs_sync_fs()'. It used to be needed, but not any longer. Pointed-out-by: Christoph Hellwig <hch@infradead.org> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'fs/ubifs')
-rw-r--r--fs/ubifs/super.c24
1 files changed, 7 insertions, 17 deletions
diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c
index 13e7ed4..b541bd7 100644
--- a/fs/ubifs/super.c
+++ b/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
@@ -453,17 +447,6 @@ static int ubifs_sync_fs(struct super_block *sb, int 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;
OpenPOWER on IntegriCloud