[patch 080/114] proc: fix PG_locked reporting in /proc/kpageflags

Greg KH
2009-03-14T01:49:48Z

[-- Attachment #1: proc-fix-pg_locked-reporting-in-proc-kpageflags.patch --]
[-- Type: text/plain, Size: 933 bytes --]

2.6.28-stable review patch. If anyone has any objections, please let us know.

------------------

From: Helge Bahmann <helge.bahmann@secunet.com>

commit e07a4b9217d1e97d2f3a62b6b070efdc61212110 upstream.

Expr always evaluates to zero.

Cc: Matt Mackall <mpm@selenic.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
fs/proc/page.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- a/fs/proc/page.c
+++ b/fs/proc/page.c
@@ -107,7 +107,7 @@ static ssize_t kpageflags_read(struct fi
else
kflags = ppage->flags;

- uflags = kpf_copy_bit(KPF_LOCKED, PG_locked, kflags) |
+ uflags = kpf_copy_bit(kflags, KPF_LOCKED, PG_locked) |
kpf_copy_bit(kflags, KPF_ERROR, PG_error) |
kpf_copy_bit(kflags, KPF_REFERENCED, PG_referenced) |
kpf_copy_bit(kflags, KPF_UPTODATE, PG_uptodate) |