Commit ee4c48c0 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] dquot_release oops fix

From: Jan Kara <jack@ucw.cz>

Fix a null-pointer-deref oops in the quota code.
parent 252a94e9
......@@ -367,7 +367,8 @@ int dquot_release(struct dquot *dquot)
if (atomic_read(&dquot->dq_count) > 1)
goto out_dqlock;
down(&dqopt->dqio_sem);
ret = dqopt->ops[dquot->dq_type]->release_dqblk(dquot);
if (dqopt->ops[dquot->dq_type]->release_dqblk)
ret = dqopt->ops[dquot->dq_type]->release_dqblk(dquot);
clear_bit(DQ_ACTIVE_B, &dquot->dq_flags);
up(&dqopt->dqio_sem);
out_dqlock:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment