]> git.baikalelectronics.ru Git - kernel.git/commit
ext4: initialize quota before expanding inode in setproject ioctl
authorJan Kara <jack@suse.cz>
Wed, 7 Dec 2022 11:59:27 +0000 (12:59 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Jan 2023 10:41:52 +0000 (11:41 +0100)
commitea8eaa9c6ee39a39ceb0282c8fdcc7c04cdebbad
tree4fa18abde4d4bdc35f7a52dd4a55e2b552fe27ac
parent0e7072f3f1dbfc74b343b6e077f8545809f7c2d4
ext4: initialize quota before expanding inode in setproject ioctl

commit 1485f726c6dec1a1f85438f2962feaa3d585526f upstream.

Make sure we initialize quotas before possibly expanding inode space
(and thus maybe needing to allocate external xattr block) in
ext4_ioctl_setproject(). This prevents not accounting the necessary
block allocation.

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