|
@@ -598,6 +598,13 @@ ext4_move_extents(struct file *o_filp, struct file *d_filp, __u64 orig_blk,
|
|
return -EOPNOTSUPP;
|
|
return -EOPNOTSUPP;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ 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 */
|
|
/* Protect orig and donor inodes against a truncate */
|
|
lock_two_nondirectories(orig_inode, donor_inode);
|
|
lock_two_nondirectories(orig_inode, donor_inode);
|
|
|
|
|