Skip to content

Commit a7abd40

Browse files
zhangyi089gregkh
authored andcommitted
ext4: correct the checking of quota files before moving extents
[ Upstream commit a2e5a3c ] 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: 02749a4 ("ext4: add ext4_is_quota_file()") Signed-off-by: Zhang Yi <yi.zhang@huawei.com> Reviewed-by: Jan Kara <jack@suse.cz> Message-ID: <20251013015128.499308-2-yi.zhang@huaweicloud.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 520de30 commit a7abd40

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/ext4/move_extent.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ mext_check_arguments(struct inode *orig_inode,
487487
return -ETXTBSY;
488488
}
489489

490-
if (ext4_is_quota_file(orig_inode) && ext4_is_quota_file(donor_inode)) {
490+
if (ext4_is_quota_file(orig_inode) || ext4_is_quota_file(donor_inode)) {
491491
ext4_debug("ext4 move extent: The argument files should not be quota files [ino:orig %lu, donor %lu]\n",
492492
orig_inode->i_ino, donor_inode->i_ino);
493493
return -EOPNOTSUPP;

0 commit comments

Comments
 (0)