Skip to content
Commit b409d7a0 authored by Jan Kara's avatar Jan Kara Committed by Joel Becker
Browse files

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: default avatarJan Kara <jack@suse.cz>
Signed-off-by: default avatarJoel Becker <joel.becker@oracle.com>
parent 8a57a9dd
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