Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 53482ffe authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ext4: allow move extents ioctl for HW FBE"

parents cd8e1735 837a1c17
Loading
Loading
Loading
Loading
+8 −5
Original line number Diff line number Diff line
@@ -602,12 +602,15 @@ ext4_move_extents(struct file *o_filp, struct file *d_filp, __u64 orig_blk,
		return -EOPNOTSUPP;
	}

	if (!fscrypt_using_hardware_encryption(orig_inode) ||
		!fscrypt_using_hardware_encryption(donor_inode)) {
		if (ext4_encrypted_inode(orig_inode) ||
		    ext4_encrypted_inode(donor_inode)) {
			ext4_msg(orig_inode->i_sb, KERN_ERR,
				 "Online defrag not supported for encrypted files");
			return -EOPNOTSUPP;
		}
	}

	/* Protect orig and donor inodes against a truncate */
	lock_two_nondirectories(orig_inode, donor_inode);