]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
fs-proc-vmcorec-put-if-tests-in-the-top-of-the-while-loop-to-reduce-duplication-fix-fix
authorAndrew Morton <akpm@linux-foundation.org>
Wed, 20 Feb 2013 02:15:58 +0000 (13:15 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 20 Feb 2013 05:53:35 +0000 (16:53 +1100)
s/max_t/min_t/

Cc: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/proc/vmcore.c

index 6e2bcf4c051ff7f3a5e8956b73571cb27c02026b..b870f740ab5a5bb2bf92451fe3b71a81d1f16a17 100644 (file)
@@ -178,7 +178,7 @@ static ssize_t read_vmcore(struct file *file, char __user *buffer,
                return -EINVAL;
 
        while (buflen) {
-               tsz = max_t(size_t, buflen, PAGE_SIZE - (start & ~PAGE_MASK));
+               tsz = min_t(size_t, buflen, PAGE_SIZE - (start & ~PAGE_MASK));
 
                /* Calculate left bytes in current memory segment. */
                nr_bytes = (curr_m->size - (start - curr_m->paddr));