[PATCH] Fix reset of ramzswap
From: minchan.kim
Date: Mon Jan 11 2010 - 23:59:14 EST
ioctl(cmd=reset)
-> bd_holder check (if whoever hold bdev, return -EBUSY)
-> ramzswap_ioctl_reset_device
-> reset_device
-> bd_release
bd_release is called by reset_device.
but ramzswap_ioctl always checks bd_holder before
reset_device. it means reset ioctl always fails.
This patch fixes it.
This patch is based on mmotm-2010-01-06-14-34 +
[PATCH] Free memory when create_device is failed.
Signed-off-by: Minchan Kim <minchan.kim@xxxxxxxxx>
Cc: Nitin Gupta <ngupta@xxxxxxxxxx>
---
drivers/staging/ramzswap/ramzswap_drv.c | 5 -----
1 files changed, 0 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/ramzswap/ramzswap_drv.c b/drivers/staging/ramzswap/ramzswap_drv.c
index 18196f3..42531bd 100644
--- a/drivers/staging/ramzswap/ramzswap_drv.c
+++ b/drivers/staging/ramzswap/ramzswap_drv.c
@@ -1270,11 +1270,6 @@ static int ramzswap_ioctl(struct block_device *bdev, fmode_t mode,
break;
case RZSIO_RESET:
- /* Do not reset an active device! */
- if (bdev->bd_holders) {
- ret = -EBUSY;
- goto out;
- }
ret = ramzswap_ioctl_reset_device(rzs);
break;
--
1.5.6.3
--
Kind regards,
Minchan Kim
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/