• Jan Kara's avatar
    ocfs2: Fix possible deadlock in quota recovery · 80d73f15
    Jan Kara authored
    In ocfs2_finish_quota_recovery() we acquired global quota file lock and started
    recovering local quota file. During this process we need to get quota
    structures, which calls ocfs2_dquot_acquire() which gets global quota file lock
    again. This second lock can block in case some other node has requested the
    quota file lock in the mean time. Fix the problem by moving quota file locking
    down into the function where it is really needed.  Then dqget() or dqput()
    won't be called with the lock held.
    Signed-off-by: default avatarJan Kara <jack@suse.cz>
    Signed-off-by: default avatarJoel Becker <joel.becker@oracle.com>
    80d73f15
quota_local.c 34 KB