From 741e128933448e589a85286e535078b24f4cf568 Mon Sep 17 00:00:00 2001 From: Jan Kara Date: Thu, 13 May 2010 18:05:15 +0200 Subject: ocfs2: Fix NULL pointer deref when writing local dquot commit_dqblk() can write quota info to global file. That is actually a bad thing to do because if we are just modifying local quota file, we are not prepared (do not hold proper locks, do not have transaction credits) to do a modification of the global quota file. So do not use commit_dqblk() and instead call our writing function directly. Acked-by: Joel Becker Signed-off-by: Jan Kara --- fs/ocfs2/quota.h | 1 + 1 file changed, 1 insertion(+) (limited to 'fs/ocfs2/quota.h') diff --git a/fs/ocfs2/quota.h b/fs/ocfs2/quota.h index 903ffa933d53..196fcb52d95d 100644 --- a/fs/ocfs2/quota.h +++ b/fs/ocfs2/quota.h @@ -109,6 +109,7 @@ int ocfs2_read_quota_phys_block(struct inode *inode, u64 p_block, struct buffer_head **bh); int ocfs2_create_local_dquot(struct dquot *dquot); int ocfs2_local_release_dquot(handle_t *handle, struct dquot *dquot); +int ocfs2_local_write_dquot(struct dquot *dquot); extern const struct dquot_operations ocfs2_quota_operations; extern struct quota_format_type ocfs2_quota_format; -- cgit