Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 116207
b: refs/heads/master
c: bed7993
h: refs/heads/master
i:
  116205: dff74a0
  116203: bb51eb0
  116199: c2f1559
  116191: 189ce53
v: v3
  • Loading branch information
Adrian Hunter authored and Artem Bityutskiy committed Sep 30, 2008
1 parent 66bc3e1 commit bd6dd10
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 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: 403e12ab30ab160e1015bd998f0abc1865c574e0
refs/heads/master: bed79935de9a658678f44b88a097367d3b26429f
19 changes: 10 additions & 9 deletions trunk/fs/ubifs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -420,21 +420,22 @@ static int ubifs_sync_fs(struct super_block *sb, int wait)
int i, ret = 0, err;
long long bud_bytes;

if (c->jheads)
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;
/* Commit the journal unless it has too little 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;
}
}

/*
Expand Down

0 comments on commit bd6dd10

Please sign in to comment.