Re: [PATCH] Fix reset of ramzswap

From: Nitin Gupta
Date: Tue Jan 12 2010 - 00:30:50 EST


On Tue, Jan 12, 2010 at 10:06 AM, minchan.kim <minchan.kim@xxxxxxxxx> wrote:
> 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.

Are you sure you checked this patch?

This check makes sure that you cannot reset an active swap device.
When device in swapoff'ed the ioctl works as expected.

Greg: Can you please exclude earlier 'Free memory when create_device
is failed' patch?
That patch is correct however, my pending patch series conflicts with
that. So, I will
instead include that fix with this patch series (and add appropriate
signed-off-by)

Thanks,
Nitin
--
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/