Commit a2e5a3ce authored by Zhang Yi's avatar Zhang Yi Committed by Theodore Ts'o
Browse files

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: 02749a4c ("ext4: add ext4_is_quota_file()")
Signed-off-by: default avatarZhang Yi <yi.zhang@huawei.com>
Reviewed-by: default avatarJan Kara <jack@suse.cz>
Message-ID: <20251013015128.499308-2-yi.zhang@huaweicloud.com>
Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
parent 6640d552
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;