projects
/
linux-2.6-microblaze.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge tag 'for-5.11/io_uring-2020-12-14' of git://git.kernel.dk/linux-block
[linux-2.6-microblaze.git]
/
mm
/
hugetlb.c
diff --git
a/mm/hugetlb.c
b/mm/hugetlb.c
index
f94c673
..
cbf32d2
100644
(file)
--- a/
mm/hugetlb.c
+++ b/
mm/hugetlb.c
@@
-2760,7
+2760,7
@@
static ssize_t nr_hugepages_show_common(struct kobject *kobj,
else
nr_huge_pages = h->nr_huge_pages_node[nid];
else
nr_huge_pages = h->nr_huge_pages_node[nid];
- return s
printf
(buf, "%lu\n", nr_huge_pages);
+ return s
ysfs_emit
(buf, "%lu\n", nr_huge_pages);
}
static ssize_t __nr_hugepages_store_common(bool obey_mempolicy,
}
static ssize_t __nr_hugepages_store_common(bool obey_mempolicy,
@@
-2833,7
+2833,8
@@
HSTATE_ATTR(nr_hugepages);
* huge page alloc/free.
*/
static ssize_t nr_hugepages_mempolicy_show(struct kobject *kobj,
* huge page alloc/free.
*/
static ssize_t nr_hugepages_mempolicy_show(struct kobject *kobj,
- struct kobj_attribute *attr, char *buf)
+ struct kobj_attribute *attr,
+ char *buf)
{
return nr_hugepages_show_common(kobj, attr, buf);
}
{
return nr_hugepages_show_common(kobj, attr, buf);
}
@@
-2851,7
+2852,7
@@
static ssize_t nr_overcommit_hugepages_show(struct kobject *kobj,
struct kobj_attribute *attr, char *buf)
{
struct hstate *h = kobj_to_hstate(kobj, NULL);
struct kobj_attribute *attr, char *buf)
{
struct hstate *h = kobj_to_hstate(kobj, NULL);
- return s
printf
(buf, "%lu\n", h->nr_overcommit_huge_pages);
+ return s
ysfs_emit
(buf, "%lu\n", h->nr_overcommit_huge_pages);
}
static ssize_t nr_overcommit_hugepages_store(struct kobject *kobj,
}
static ssize_t nr_overcommit_hugepages_store(struct kobject *kobj,
@@
-2889,7
+2890,7
@@
static ssize_t free_hugepages_show(struct kobject *kobj,
else
free_huge_pages = h->free_huge_pages_node[nid];
else
free_huge_pages = h->free_huge_pages_node[nid];
- return s
printf
(buf, "%lu\n", free_huge_pages);
+ return s
ysfs_emit
(buf, "%lu\n", free_huge_pages);
}
HSTATE_ATTR_RO(free_hugepages);
}
HSTATE_ATTR_RO(free_hugepages);
@@
-2897,7
+2898,7
@@
static ssize_t resv_hugepages_show(struct kobject *kobj,
struct kobj_attribute *attr, char *buf)
{
struct hstate *h = kobj_to_hstate(kobj, NULL);
struct kobj_attribute *attr, char *buf)
{
struct hstate *h = kobj_to_hstate(kobj, NULL);
- return s
printf
(buf, "%lu\n", h->resv_huge_pages);
+ return s
ysfs_emit
(buf, "%lu\n", h->resv_huge_pages);
}
HSTATE_ATTR_RO(resv_hugepages);
}
HSTATE_ATTR_RO(resv_hugepages);
@@
-2914,7
+2915,7
@@
static ssize_t surplus_hugepages_show(struct kobject *kobj,
else
surplus_huge_pages = h->surplus_huge_pages_node[nid];
else
surplus_huge_pages = h->surplus_huge_pages_node[nid];
- return s
printf
(buf, "%lu\n", surplus_huge_pages);
+ return s
ysfs_emit
(buf, "%lu\n", surplus_huge_pages);
}
HSTATE_ATTR_RO(surplus_hugepages);
}
HSTATE_ATTR_RO(surplus_hugepages);
@@
-5113,6
+5114,7
@@
int hugetlb_reserve_pages(struct inode *inode,
if (unlikely(add < 0)) {
hugetlb_acct_memory(h, -gbl_reserve);
if (unlikely(add < 0)) {
hugetlb_acct_memory(h, -gbl_reserve);
+ ret = add;
goto out_put_pages;
} else if (unlikely(chg > add)) {
/*
goto out_put_pages;
} else if (unlikely(chg > add)) {
/*