Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 164049
b: refs/heads/master
c: 887ee17
h: refs/heads/master
i:
  164047: 25b7cd4
v: v3
  • Loading branch information
Artem Bityutskiy authored and Artem Bityutskiy committed Jul 24, 2009
1 parent b9b0a02 commit c63d22f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 18 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e9d6bbc428bdf0c08bbd0b3f28db2b7317cfff21
refs/heads/master: 887ee17117fd23e962332b353d250ac9e090b20f
24 changes: 7 additions & 17 deletions trunk/fs/ubifs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand All @@ -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;
Expand Down

0 comments on commit c63d22f

Please sign in to comment.