]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
hugetlbfs-add-memcg-control-files-for-hugetlbfs-use-scnprintf-instead-of-sprintf-fix
authorAndrew Morton <akpm@linux-foundation.org>
Wed, 25 Apr 2012 01:03:36 +0000 (11:03 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 30 Apr 2012 05:17:21 +0000 (15:17 +1000)
s/scnprintf/snprintf/

Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Cc: Hillf Danton <dhillf@gmail.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Michal Hocko <mhocko@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/memcontrol.c

index e27ba7f44db18b31e5bc130024762b8eab08404e..1c5e0969362e8b5191c922de9f7c13a1be8030be 100644 (file)
@@ -4031,7 +4031,7 @@ static ssize_t mem_cgroup_read(struct cgroup *cont, struct cftype *cft,
                BUG();
        }
 
-       len = scnprintf(str, sizeof(str), "%llu\n", (unsigned long long)val);
+       len = snprintf(str, sizeof(str), "%llu\n", (unsigned long long)val);
        return simple_read_from_buffer(buf, nbytes, ppos, str, len);
 }
 /*
@@ -5193,11 +5193,11 @@ static void mem_cgroup_destroy(struct cgroup *cont)
 static char *mem_fmt(char *buf, int size, unsigned long hsize)
 {
        if (hsize >= (1UL << 30))
-               scnprintf(buf, size, "%luGB", hsize >> 30);
+               snprintf(buf, size, "%luGB", hsize >> 30);
        else if (hsize >= (1UL << 20))
-               scnprintf(buf, size, "%luMB", hsize >> 20);
+               snprintf(buf, size, "%luMB", hsize >> 20);
        else
-               scnprintf(buf, size, "%luKB", hsize >> 10);
+               snprintf(buf, size, "%luKB", hsize >> 10);
        return buf;
 }