Message ID | 20190314154025.21128-1-david@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [v1] xen/balloon: Fix mapping PG_offline pages to user space | expand |
On Thu, Mar 14, 2019 at 04:40:25PM +0100, David Hildenbrand wrote: > @@ -646,6 +647,7 @@ void free_xenballooned_pages(int nr_pages, struct page **pages) > > for (i = 0; i < nr_pages; i++) { > if (pages[i]) > + __SetPageOffline(pages[i]); > balloon_append(pages[i]); didn't you forget {} there? ;-) > } > > -- > 2.17.2 >
>>> On 14.03.19 at 16:40, <david@redhat.com> wrote: > --- a/drivers/xen/balloon.c > +++ b/drivers/xen/balloon.c > @@ -604,6 +604,7 @@ int alloc_xenballooned_pages(int nr_pages, struct page **pages) > while (pgno < nr_pages) { > page = balloon_retrieve(true); > if (page) { > + __ClearPageOffline(page); > pages[pgno++] = page; While this one's fine, ... > @@ -646,6 +647,7 @@ void free_xenballooned_pages(int nr_pages, struct page **pages) > > for (i = 0; i < nr_pages; i++) { > if (pages[i]) > + __SetPageOffline(pages[i]); > balloon_append(pages[i]); > } ... I think you want to add a pair of braces here. Jan
On 14.03.19 16:49, Oscar Salvador wrote: > On Thu, Mar 14, 2019 at 04:40:25PM +0100, David Hildenbrand wrote: >> @@ -646,6 +647,7 @@ void free_xenballooned_pages(int nr_pages, struct page **pages) >> >> for (i = 0; i < nr_pages; i++) { >> if (pages[i]) >> + __SetPageOffline(pages[i]); >> balloon_append(pages[i]); > > didn't you forget {} there? ;-) > That's what happens when you stashed the original patch and try to recreate it quickly from a mail ;) Thanks!
On 14.03.19 16:49, Jan Beulich wrote: >>>> On 14.03.19 at 16:40, <david@redhat.com> wrote: >> --- a/drivers/xen/balloon.c >> +++ b/drivers/xen/balloon.c >> @@ -604,6 +604,7 @@ int alloc_xenballooned_pages(int nr_pages, struct page **pages) >> while (pgno < nr_pages) { >> page = balloon_retrieve(true); >> if (page) { >> + __ClearPageOffline(page); >> pages[pgno++] = page; > > While this one's fine, ... > >> @@ -646,6 +647,7 @@ void free_xenballooned_pages(int nr_pages, struct page **pages) >> >> for (i = 0; i < nr_pages; i++) { >> if (pages[i]) >> + __SetPageOffline(pages[i]); >> balloon_append(pages[i]); >> } > > ... I think you want to add a pair of braces here. > > Jan > > Indeed, dropped by accident. Will resend in a minute. Thanks!
diff --git a/drivers/xen/balloon.c b/drivers/xen/balloon.c index 39b229f9e256..751d32f41f26 100644 --- a/drivers/xen/balloon.c +++ b/drivers/xen/balloon.c @@ -604,6 +604,7 @@ int alloc_xenballooned_pages(int nr_pages, struct page **pages) while (pgno < nr_pages) { page = balloon_retrieve(true); if (page) { + __ClearPageOffline(page); pages[pgno++] = page; #ifdef CONFIG_XEN_HAVE_PVMMU /* @@ -646,6 +647,7 @@ void free_xenballooned_pages(int nr_pages, struct page **pages) for (i = 0; i < nr_pages; i++) { if (pages[i]) + __SetPageOffline(pages[i]); balloon_append(pages[i]); }