[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1263271018.23507.8.camel@barrios-desktop>
Date: Tue, 12 Jan 2010 13:36:58 +0900
From: "minchan.kim" <minchan.kim@...il.com>
To: Greg KH <greg@...ah.com>, Nitin Gupta <ngupta@...are.org>
Cc: LKML <linux-kernel@...r.kernel.org>, linux-mm <linux-mm@...ck.org>
Subject: [PATCH] Fix reset of ramzswap
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@...il.com>
Cc: Nitin Gupta <ngupta@...are.org>
---
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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists