quota: sb_quota state flags cleanup

- remove hardcoded USRQUOTA/GRPQUOTA flags
- convert int to bool for appropriate functions

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Jan Kara <jack@suse.cz>
This commit is contained in:
Dmitry Monakhov
2010-02-16 08:31:49 +03:00
committed by Jan Kara
parent 8696391896
commit ad1e6e8da9
3 changed files with 26 additions and 23 deletions

View File

@@ -1301,7 +1301,7 @@ int dquot_initialize(struct inode *inode, int type)
{
unsigned int id = 0;
int cnt, ret = 0;
struct dquot *got[MAXQUOTAS] = { NULL, NULL };
struct dquot *got[MAXQUOTAS];
struct super_block *sb = inode->i_sb;
qsize_t rsv;
@@ -1312,6 +1312,7 @@ int dquot_initialize(struct inode *inode, int type)
/* First get references to structures we might need. */
for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
got[cnt] = NULL;
if (type != -1 && cnt != type)
continue;
switch (cnt) {