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

Commit 5a95be36 authored by Amit Pundir's avatar Amit Pundir
Browse files

ANDROID: ext4: fix FIDTRIM support



Use blk_queue_secure_erase() introduced in upstream commit 288dab8a
("block: add a separate operation type for secure erase") instead of
obsolete blk_queue_secdiscard() to fix compilation error.

Fixes: AOSP Change-Id: I676a1404a80130d93930c84898360f2e6fb2f81e
       ("ext4: Add support for FIDTRIM, a best-effort ioctl for
        deep discard trim")
Signed-off-by: default avatarAmit Pundir <amit.pundir@linaro.org>
parent cd60b7b1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -749,7 +749,7 @@ long ext4_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
		if (!blk_queue_discard(q))
			return -EOPNOTSUPP;

		if ((flags & BLKDEV_DISCARD_SECURE) && !blk_queue_secdiscard(q))
		if ((flags & BLKDEV_DISCARD_SECURE) && !blk_queue_secure_erase(q))
			return -EOPNOTSUPP;
		if (copy_from_user(&range, (struct fstrim_range __user *)arg,
		    sizeof(range)))