aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/ubifs/super.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c
index 7e1f3efdf632..7fd759dde796 100644
--- a/fs/ubifs/super.c
+++ b/fs/ubifs/super.c
@@ -420,21 +420,22 @@ static int ubifs_sync_fs(struct super_block *sb, int wait)
420 int i, ret = 0, err; 420 int i, ret = 0, err;
421 long long bud_bytes; 421 long long bud_bytes;
422 422
423 if (c->jheads) 423 if (c->jheads) {
424 for (i = 0; i < c->jhead_cnt; i++) { 424 for (i = 0; i < c->jhead_cnt; i++) {
425 err = ubifs_wbuf_sync(&c->jheads[i].wbuf); 425 err = ubifs_wbuf_sync(&c->jheads[i].wbuf);
426 if (err && !ret) 426 if (err && !ret)
427 ret = err; 427 ret = err;
428 } 428 }
429 429
430 /* Commit the journal unless it has too few data */ 430 /* Commit the journal unless it has too little data */
431 spin_lock(&c->buds_lock); 431 spin_lock(&c->buds_lock);
432 bud_bytes = c->bud_bytes; 432 bud_bytes = c->bud_bytes;
433 spin_unlock(&c->buds_lock); 433 spin_unlock(&c->buds_lock);
434 if (bud_bytes > c->leb_size) { 434 if (bud_bytes > c->leb_size) {
435 err = ubifs_run_commit(c); 435 err = ubifs_run_commit(c);
436 if (err) 436 if (err)
437 return err; 437 return err;
438 }
438 } 439 }
439 440
440 /* 441 /*