From: Minchan Kim <minchan.kim@gmail.com>
To: Nitin Gupta <ngupta@vflare.org>
Cc: Greg KH <greg@kroah.com>, LKML <linux-kernel@vger.kernel.org>,
linux-mm <linux-mm@kvack.org>
Subject: Re: [PATCH] Fix reset of ramzswap
Date: Tue, 12 Jan 2010 14:48:28 +0900 [thread overview]
Message-ID: <1263275308.23507.18.camel@barrios-desktop> (raw)
In-Reply-To: <d760cf2d1001112130p8489b93uccd6a4650ff4a4a8@mail.gmail.com>
On Tue, 2010-01-12 at 11:00 +0530, Nitin Gupta wrote:
> On Tue, Jan 12, 2010 at 10:06 AM, minchan.kim <minchan.kim@gmail.com> 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.
>
It seems my test was wrong.
Maybe my test case don't swapoff swap device.
Sorry. Ignore this patch, pz.
Thanks for the reivew, Nitin.
I have one more patch. But I don't want to conflict your pending
patches. If it is right, pz, merge this patch with your pending series.
>From bf810ec09761b0f37eca7ba22d72fb2b1f2cba50 Mon Sep 17 00:00:00 2001
From: Minchan Kim <minchan.kim@gmail.com>
Date: Tue, 12 Jan 2010 14:46:46 +0900
Subject: [PATCH] Remove unnecessary check of ramzswap_write
Nitin already implement swap slot free callback.
So, we don't need this test any more.
Signed-off-by: Minchan Kim <minchan.kim@gmail.com>
---
drivers/staging/ramzswap/ramzswap_drv.c | 8 --------
1 files changed, 0 insertions(+), 8 deletions(-)
diff --git a/drivers/staging/ramzswap/ramzswap_drv.c
b/drivers/staging/ramzswap/ramzswap_drv.c
index 18196f3..575a147 100644
--- a/drivers/staging/ramzswap/ramzswap_drv.c
+++ b/drivers/staging/ramzswap/ramzswap_drv.c
@@ -784,14 +784,6 @@ static int ramzswap_write(struct ramzswap *rzs,
struct bio *bio)
src = rzs->compress_buffer;
/*
- * System swaps to same sector again when the stored page
- * is no longer referenced by any process. So, its now safe
- * to free the memory that was allocated for this page.
- */
- if (rzs->table[index].page)
- ramzswap_free_page(rzs, index);
-
- /*
* No memory ia allocated for zero filled pages.
* Simply clear zero page flag.
*/
--
1.5.6.3
--
Kind regards,
Minchan Kim
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2010-01-12 5:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-12 4:36 minchan.kim
2010-01-12 5:30 ` Nitin Gupta
2010-01-12 5:48 ` Minchan Kim [this message]
2010-01-12 6:48 ` Nitin Gupta
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1263275308.23507.18.camel@barrios-desktop \
--to=minchan.kim@gmail.com \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ngupta@vflare.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox