UBIFS: introduce a separate structure for budgeting info

This patch separates out all the budgeting-related information
from 'struct ubifs_info' to 'struct ubifs_budg_info'. This way the
code looks a bit cleaner. However, the main driver for this is
that we want to save budgeting information and print it later,
so a separate data structure for this is helpful.

This patch is a preparation for the further debugging output
improvements.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
This commit is contained in:
Artem Bityutskiy
2011-03-29 18:04:05 +03:00
parent cc64f774b4
commit b137545c44
11 changed files with 134 additions and 129 deletions

View File

@@ -603,7 +603,7 @@ static int ubifs_unlink(struct inode *dir, struct dentry *dentry)
ubifs_release_budget(c, &req);
else {
/* We've deleted something - clean the "no space" flags */
c->nospace = c->nospace_rp = 0;
c->bi.nospace = c->bi.nospace_rp = 0;
smp_wmb();
}
return 0;
@@ -693,7 +693,7 @@ static int ubifs_rmdir(struct inode *dir, struct dentry *dentry)
ubifs_release_budget(c, &req);
else {
/* We've deleted something - clean the "no space" flags */
c->nospace = c->nospace_rp = 0;
c->bi.nospace = c->bi.nospace_rp = 0;
smp_wmb();
}
return 0;