From b55b87b4f866b4b7e5abfbe763a371da24179cac Mon Sep 17 00:00:00 2001 From: Artem Bityutskiy Date: Tue, 6 Jan 2009 14:40:23 -0800 Subject: [PATCH] --- yaml --- r: 126251 b: refs/heads/master c: e8ea1759138d4279869f52bfb7dca8f02f8ccfe5 h: refs/heads/master i: 126249: d0450412a2ebcf1833f36f19ae3b3e6f58630a8f 126247: bb31aabdc6b9e2a7b2a2e3d4278321ac33ab7b20 v: v3 --- [refs] | 2 +- trunk/fs/ubifs/super.c | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index be413b1c8b6a..1468d90fb648 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 48b47c561e41525061b5bc0cfd67d6367fd11dc4 +refs/heads/master: e8ea1759138d4279869f52bfb7dca8f02f8ccfe5 diff --git a/trunk/fs/ubifs/super.c b/trunk/fs/ubifs/super.c index 0d7564b95f8e..89556ee72518 100644 --- a/trunk/fs/ubifs/super.c +++ b/trunk/fs/ubifs/super.c @@ -432,12 +432,19 @@ 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 = wait ? WB_SYNC_ALL : WB_SYNC_HOLD, + .sync_mode = wait ? WB_SYNC_ALL : WB_SYNC_NONE, .range_start = 0, .range_end = LLONG_MAX, .nr_to_write = LONG_MAX, }; + /* + * Note by akpm about WB_SYNC_NONE used above: zero @wait is just an + * advisory thing to help the file system shove lots of data into the + * queues. If some gets missed then it'll be picked up on the second + * '->sync_fs()' call, with non-zero @wait. + */ + if (sb->s_flags & MS_RDONLY) return 0;