]> www.infradead.org Git - users/dwmw2/linux.git/commit
ext4: make sure quota gets properly shutdown on error
authorJan Kara <jack@suse.cz>
Thu, 7 Oct 2021 15:53:35 +0000 (17:53 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jan 2022 08:04:31 +0000 (09:04 +0100)
commit841bba6544e10cab41535b76bbdd37555a6ab9df
tree4c97160adb3c87551832238a8e3afce00c54af07
parentef41f72716c469a670b9d556b65e5ed83a3a5fd7
ext4: make sure quota gets properly shutdown on error

commit 15fc69bbbbbc8c72e5f6cc4e1be0f51283c5448e upstream.

When we hit an error when enabling quotas and setting inode flags, we do
not properly shutdown quota subsystem despite returning error from
Q_QUOTAON quotactl. This can lead to some odd situations like kernel
using quota file while it is still writeable for userspace. Make sure we
properly cleanup the quota subsystem in case of error.

Signed-off-by: Jan Kara <jack@suse.cz>
Cc: stable@kernel.org
Link: https://lore.kernel.org/r/20211007155336.12493-2-jack@suse.cz
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ext4/super.c