diff options
-rw-r--r-- | fs/ubifs/budget.c | 3 | ||||
-rw-r--r-- | fs/ubifs/super.c | 5 |
2 files changed, 7 insertions, 1 deletions
diff --git a/fs/ubifs/budget.c b/fs/ubifs/budget.c index af1914462f02..d0231ba783df 100644 --- a/fs/ubifs/budget.c +++ b/fs/ubifs/budget.c | |||
@@ -628,7 +628,7 @@ void ubifs_convert_page_budget(struct ubifs_info *c) | |||
628 | * | 628 | * |
629 | * This function releases budget corresponding to a dirty inode. It is usually | 629 | * This function releases budget corresponding to a dirty inode. It is usually |
630 | * called when after the inode has been written to the media and marked as | 630 | * called when after the inode has been written to the media and marked as |
631 | * clean. | 631 | * clean. It also causes the "no space" flags to be cleared. |
632 | */ | 632 | */ |
633 | void ubifs_release_dirty_inode_budget(struct ubifs_info *c, | 633 | void ubifs_release_dirty_inode_budget(struct ubifs_info *c, |
634 | struct ubifs_inode *ui) | 634 | struct ubifs_inode *ui) |
@@ -636,6 +636,7 @@ void ubifs_release_dirty_inode_budget(struct ubifs_info *c, | |||
636 | struct ubifs_budget_req req; | 636 | struct ubifs_budget_req req; |
637 | 637 | ||
638 | memset(&req, 0, sizeof(struct ubifs_budget_req)); | 638 | memset(&req, 0, sizeof(struct ubifs_budget_req)); |
639 | /* The "no space" flags will be cleared because dd_growth is > 0 */ | ||
639 | req.dd_growth = c->inode_budget + ALIGN(ui->data_len, 8); | 640 | req.dd_growth = c->inode_budget + ALIGN(ui->data_len, 8); |
640 | ubifs_release_budget(c, &req); | 641 | ubifs_release_budget(c, &req); |
641 | } | 642 | } |
diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c index faa44f90608a..f2c1c0b79f66 100644 --- a/fs/ubifs/super.c +++ b/fs/ubifs/super.c | |||
@@ -360,6 +360,11 @@ static void ubifs_delete_inode(struct inode *inode) | |||
360 | out: | 360 | out: |
361 | if (ui->dirty) | 361 | if (ui->dirty) |
362 | ubifs_release_dirty_inode_budget(c, ui); | 362 | ubifs_release_dirty_inode_budget(c, ui); |
363 | else { | ||
364 | /* We've deleted something - clean the "no space" flags */ | ||
365 | c->nospace = c->nospace_rp = 0; | ||
366 | smp_wmb(); | ||
367 | } | ||
363 | clear_inode(inode); | 368 | clear_inode(inode); |
364 | } | 369 | } |
365 | 370 | ||