diff options
author | Wu Fengguang <fengguang.wu@intel.com> | 2009-03-11 09:00:04 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-03-16 17:52:57 -0700 |
commit | 3ae64442d1606bc985daf77b55c1d764b1d91c33 (patch) | |
tree | 49cf13007bf4afbf14ea0664f49aa603ae7cccb6 | |
parent | 12f6c7575ef7751cb5ac8b40dc0e477c53426bf9 (diff) | |
download | lwn-3ae64442d1606bc985daf77b55c1d764b1d91c33.tar.gz lwn-3ae64442d1606bc985daf77b55c1d764b1d91c33.zip |
proc: fix kflags to uflags copying in /proc/kpageflags
commit ad3bdefe877afb47480418fdb05ecd42842de65e upstream.
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>
Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | fs/proc/proc_misc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/proc/proc_misc.c b/fs/proc/proc_misc.c index 29e20c6b1f7f..dd68a33de624 100644 --- a/fs/proc/proc_misc.c +++ b/fs/proc/proc_misc.c @@ -797,7 +797,7 @@ static 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) static ssize_t kpageflags_read(struct file *file, char __user *buf, size_t count, loff_t *ppos) |