ext4: clear lockdep subtype for quota files on quota off
authorJan Kara <jack@suse.cz>
Mon, 22 May 2017 02:31:23 +0000 (22:31 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 22 May 2017 02:31:23 +0000 (22:31 -0400)
commit964edf66bf9ab70cb387b27946c0aef7b94c4d1b
tree1c7bc7711f0199abf6ccf5f87a9c45fbc1f261a8
parent08332893e37af6ae779367e78e444f8f9571511d
ext4: clear lockdep subtype for quota files on quota off

Quota files have special ranking of i_data_sem lock. We inform lockdep
about it when turning on quotas however when turning quotas off, we
don't clear the lockdep subclass from i_data_sem lock and thus when the
inode gets later reused for a normal file or directory, lockdep gets
confused and complains about possible deadlocks. Fix the problem by
resetting lockdep subclass of i_data_sem on quota off.

Cc: stable@vger.kernel.org
Fixes: daf647d2dd58cec59570d7698a45b98e580f2076
Reported-and-tested-by: Ross Zwisler <ross.zwisler@linux.intel.com>
Reviewed-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/super.c