From: Zhang Yi Date: Mon, 13 Oct 2025 01:51:17 +0000 (+0800) Subject: ext4: correct the checking of quota files before moving extents X-Git-Tag: v6.19-rc1~161^2~55 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a2e5a3cea4b18f6e2575acc444a5e8cce1fc8260;p=thirdparty%2Flinux.git ext4: correct the checking of quota files before moving extents The move extent operation should return -EOPNOTSUPP if any of the inodes is a quota inode, rather than requiring both to be quota inodes. Fixes: 02749a4c2082 ("ext4: add ext4_is_quota_file()") Signed-off-by: Zhang Yi Reviewed-by: Jan Kara Message-ID: <20251013015128.499308-2-yi.zhang@huaweicloud.com> Signed-off-by: Theodore Ts'o --- diff --git a/fs/ext4/move_extent.c b/fs/ext4/move_extent.c index 4b091c21908fd..0f4b7c89edd39 100644 --- a/fs/ext4/move_extent.c +++ b/fs/ext4/move_extent.c @@ -485,7 +485,7 @@ mext_check_arguments(struct inode *orig_inode, return -ETXTBSY; } - if (ext4_is_quota_file(orig_inode) && ext4_is_quota_file(donor_inode)) { + if (ext4_is_quota_file(orig_inode) || ext4_is_quota_file(donor_inode)) { ext4_debug("ext4 move extent: The argument files should not be quota files [ino:orig %lu, donor %lu]\n", orig_inode->i_ino, donor_inode->i_ino); return -EOPNOTSUPP;