From f190bc07c260f34cf627bdc0b28a00eaa1ed2d28 Mon Sep 17 00:00:00 2001 From: Xiaojun Ji Date: Tue, 7 Nov 2023 22:49:22 -0500 Subject: [PATCH] Revert "(CR) moto_swap: Add SWP_SYNCHRONOUS_IO cmd for ioctl" This reverts commit 0d5cadb6c01d50b3a543c5842487bd358248e66f. Change-Id: Ic0cf12be9914cd115eb3ac1711ff8ae4c68c019e Reviewed-on: https://gerrit.mot.com/2789152 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Reviewed-by: Huosheng Liao Tested-by: Jira Key Submit-Approved: Jira Key --- drivers/moto_swap/zram-5.4/zram_drv.c | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/drivers/moto_swap/zram-5.4/zram_drv.c b/drivers/moto_swap/zram-5.4/zram_drv.c index ac5ce3275e17..7abdf6e8823b 100644 --- a/drivers/moto_swap/zram-5.4/zram_drv.c +++ b/drivers/moto_swap/zram-5.4/zram_drv.c @@ -1752,22 +1752,6 @@ static void zram_slot_free_notify(struct block_device *bdev, zram_slot_unlock(zram, index); } -static int zram_ioctl(struct block_device *bdev, fmode_t mode, - unsigned int cmd, unsigned long index) -{ - struct zram *zram; - int has_sync_io = 1; - - if (cmd != SWP_SYNCHRONOUS_IO) return -EINVAL; - - zram = bdev->bd_disk->private_data; - zram_slot_lock(zram, index); - has_sync_io = zram_test_flag(zram, index, ZRAM_WB) ? 0 : 1; - zram_slot_unlock(zram, index); - - return has_sync_io; -} - static int zram_rw_page(struct block_device *bdev, sector_t sector, struct page *page, unsigned int op) { @@ -1960,7 +1944,6 @@ static int zram_open(struct block_device *bdev, fmode_t mode) static const struct block_device_operations zram_devops = { .open = zram_open, .swap_slot_free_notify = zram_slot_free_notify, - .ioctl = zram_ioctl, .rw_page = zram_rw_page, .owner = THIS_MODULE };