From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
To: Wu Fengguang <fengguang.wu@intel.com>
Cc: kosaki.motohiro@jp.fujitsu.com,
Andrew Morton <akpm@linux-foundation.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
stable@kernel.org, LKML <linux-kernel@vger.kernel.org>,
Matt Mackall <mpm@selenic.com>,
Alexey Dobriyan <adobriyan@gmail.com>
Subject: Re: [PATCH] proc: fix kflags to uflags copying in /proc/kpageflags
Date: Wed, 11 Mar 2009 10:17:58 +0900 (JST) [thread overview]
Message-ID: <20090311101612.A7FD.A69D9226@jp.fujitsu.com> (raw)
In-Reply-To: <20090311010004.GA8237@localhost>
> Fix kpf_copy_bit(src,dst) to be kpf_copy_bit(dst,src) to match the
> actual call patterns, e.g. kpf_copy_bit(kflags, KPF_LOCKED, PG_locked).
>
> This misplacement of src/dst only affected reporting of PG_writeback,
> PG_reclaim and PG_buddy. For others kflags==uflags so not affected.
>
> Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
> ---
>
> This is a tested and trivial no-side-effect fix.
> I'd suggest it for 2.6.29-rc7 and 2.6.28.X kernels.
>
> diff --git a/fs/proc/page.c b/fs/proc/page.c
> index 2d13451..e998383 100644
> --- a/fs/proc/page.c
> +++ b/fs/proc/page.c
> @@ -80,7 +80,7 @@ static const struct file_operations proc_kpagecount_operations = {
> #define KPF_RECLAIM 9
> #define KPF_BUDDY 10
>
> -#define kpf_copy_bit(flags, srcpos, dstpos) (((flags >> srcpos) & 1) << dstpos)
> +#define kpf_copy_bit(flags, dstpos, srcpos) (((flags >> srcpos) & 1) << dstpos)
Good catch! :)
Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
but don't worry. the number of this interface user is very few.
next prev parent reply other threads:[~2009-03-11 1:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-11 1:00 Wu Fengguang
2009-03-11 1:17 ` KOSAKI Motohiro [this message]
2009-03-11 1:23 ` Wu Fengguang
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=20090311101612.A7FD.A69D9226@jp.fujitsu.com \
--to=kosaki.motohiro@jp.fujitsu.com \
--cc=adobriyan@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=fengguang.wu@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mpm@selenic.com \
--cc=stable@kernel.org \
--cc=torvalds@linux-foundation.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
all inboxes | Powered by JetHome®