Skip to content

Commit

Permalink
UBIFS: do not use WB_SYNC_HOLD
Browse files Browse the repository at this point in the history
WB_SYNC_HOLD is going to be zapped so we should not use it. Use
%WB_SYNC_NONE instead. Here is what akpm said:

"I think I'll just switch that to WB_SYNC_NONE.  The `wait==0' mode is
just an advisory thing to help the fs shove lots of data into the
queues.  If some gets missed then it'll be picked up on the second
->sync_fs call, with wait==1."

Thanks to Randy Dunlap for catching this.

Signed-off-by: Artem Bityutskiy <[email protected]>
Cc: Nick Piggin <[email protected]>
Cc: Randy Dunlap <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Artem Bityutskiy authored and torvalds committed Jan 6, 2009
1 parent 48b47c5 commit e8ea175
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion fs/ubifs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit e8ea175

Please sign in to comment.