From ee4c48c066c1aa2e6f34decf4ad15a3a32952c6a Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Fri, 14 May 2004 20:21:37 -0700 Subject: [PATCH] [PATCH] dquot_release oops fix From: Jan Kara Fix a null-pointer-deref oops in the quota code. --- fs/dquot.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/dquot.c b/fs/dquot.c index 43759644ef935..ef4110e045f94 100644 --- a/fs/dquot.c +++ b/fs/dquot.c @@ -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: -- 2.53.0