From: Akinobu Mita <mita@miraclelinux.com>
To: linux-kernel@vger.kernel.org, akpm@osdl.org
Subject: [PATCH] fix swap cluster offset
Date: Sun, 12 Mar 2006 12:34:50 +0800 [thread overview]
Message-ID: <20060312043450.GA7088@miraclelinux.com> (raw)
When we've allocated SWAPFILE_CLUSTER pages, ->cluster_next should
be the first index of swap cluster. But current code probably sets it
wrong offset.
Signed-off-by: Akinobu Mita <mita@miraclelinux.com>
Index: work/mm/swapfile.c
===================================================================
--- work.orig/mm/swapfile.c
+++ work/mm/swapfile.c
@@ -116,7 +116,7 @@ static inline unsigned long scan_swap_ma
last_in_cluster = offset + SWAPFILE_CLUSTER;
else if (offset == last_in_cluster) {
spin_lock(&swap_lock);
- si->cluster_next = offset-SWAPFILE_CLUSTER-1;
+ si->cluster_next = offset-SWAPFILE_CLUSTER+1;
goto cluster;
}
if (unlikely(--latency_ration < 0)) {
next reply other threads:[~2006-03-12 5:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-12 4:34 Akinobu Mita [this message]
2006-03-13 16:52 ` [PATCH] fix swap cluster offset Hugh Dickins
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=20060312043450.GA7088@miraclelinux.com \
--to=mita@miraclelinux.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.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