summaryrefslogtreecommitdiff
path: root/fs/ocfs2/journal.h
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2009-08-06 23:29:34 +0200
committerJoel Becker <joel.becker@oracle.com>2009-08-10 12:20:22 -0700
commitb409d7a0ab46fe530efe52734984b4ed5d46c3eb (patch)
treef9f7861ff8b943ee905dc16a8290cac757df391e /fs/ocfs2/journal.h
parent8a57a9dda760ea7845390f1cd36f3eb2a49391d8 (diff)
downloadlinux-3.10-b409d7a0ab46fe530efe52734984b4ed5d46c3eb.tar.gz
linux-3.10-b409d7a0ab46fe530efe52734984b4ed5d46c3eb.tar.bz2
linux-3.10-b409d7a0ab46fe530efe52734984b4ed5d46c3eb.zip
ocfs2: Fix possible deadlock when extending quota file
In OCFS2, allocator locks rank above transaction start. Thus we cannot extend quota file from inside a transaction less we could deadlock. We solve the problem by starting transaction not already in ocfs2_acquire_dquot() but only in ocfs2_local_read_dquot() and ocfs2_global_read_dquot() and we allocate blocks to quota files before starting the transaction. In case we crash, quota files will just have a few blocks more but that's no problem since we just use them next time we extend the quota file. Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Joel Becker <joel.becker@oracle.com>
Diffstat (limited to 'fs/ocfs2/journal.h')
-rw-r--r--fs/ocfs2/journal.h5
1 files changed, 0 insertions, 5 deletions
diff --git a/fs/ocfs2/journal.h b/fs/ocfs2/journal.h
index 4a4d3b55fd2..2c3222aec62 100644
--- a/fs/ocfs2/journal.h
+++ b/fs/ocfs2/journal.h
@@ -363,11 +363,6 @@ static inline int ocfs2_quota_trans_credits(struct super_block *sb)
return credits;
}
-/* Number of credits needed for removing quota structure from file */
-int ocfs2_calc_qdel_credits(struct super_block *sb, int type);
-/* Number of credits needed for initialization of new quota structure */
-int ocfs2_calc_qinit_credits(struct super_block *sb, int type);
-
/* group extend. inode update and last group update. */
#define OCFS2_GROUP_EXTEND_CREDITS (OCFS2_INODE_UPDATE_CREDITS + 1)