quota: Handle quotas without quota inodes in dquot_get_state()
Make dquot_get_state() gracefully handle a situation when there are no quota files present even though quotas are enabled. Signed-off-by: Jan Kara <jack@suse.cz>
This commit is contained in:
parent
2ec1f3011f
commit
a0828b6ccb
|
@ -2787,8 +2787,10 @@ int dquot_get_state(struct super_block *sb, struct qc_state *state)
|
||||||
tstate->flags |= QCI_LIMITS_ENFORCED;
|
tstate->flags |= QCI_LIMITS_ENFORCED;
|
||||||
tstate->spc_timelimit = mi->dqi_bgrace;
|
tstate->spc_timelimit = mi->dqi_bgrace;
|
||||||
tstate->ino_timelimit = mi->dqi_igrace;
|
tstate->ino_timelimit = mi->dqi_igrace;
|
||||||
tstate->ino = dqopt->files[type]->i_ino;
|
if (dqopt->files[type]) {
|
||||||
tstate->blocks = dqopt->files[type]->i_blocks;
|
tstate->ino = dqopt->files[type]->i_ino;
|
||||||
|
tstate->blocks = dqopt->files[type]->i_blocks;
|
||||||
|
}
|
||||||
tstate->nextents = 1; /* We don't know... */
|
tstate->nextents = 1; /* We don't know... */
|
||||||
spin_unlock(&dq_data_lock);
|
spin_unlock(&dq_data_lock);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue