Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 116206
b: refs/heads/master
c: 403e12a
h: refs/heads/master
v: v3
  • Loading branch information
Artem Bityutskiy authored and Artem Bityutskiy committed Sep 30, 2008
1 parent dff74a0 commit 66bc3e1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: af2eb5637b88f7b8edf295ad3880706c5c30c324
refs/heads/master: 403e12ab30ab160e1015bd998f0abc1865c574e0
12 changes: 12 additions & 0 deletions trunk/fs/ubifs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -418,13 +418,25 @@ static int ubifs_sync_fs(struct super_block *sb, int wait)
{
struct ubifs_info *c = sb->s_fs_info;
int i, ret = 0, err;
long long bud_bytes;

if (c->jheads)
for (i = 0; i < c->jhead_cnt; i++) {
err = ubifs_wbuf_sync(&c->jheads[i].wbuf);
if (err && !ret)
ret = err;
}

/* Commit the journal unless it has too few data */
spin_lock(&c->buds_lock);
bud_bytes = c->bud_bytes;
spin_unlock(&c->buds_lock);
if (bud_bytes > c->leb_size) {
err = ubifs_run_commit(c);
if (err)
return err;
}

/*
* We ought to call sync for c->ubi but it does not have one. If it had
* it would in turn call mtd->sync, however mtd operations are
Expand Down

0 comments on commit 66bc3e1

Please sign in to comment.