public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] virtio_balloon: fix build regression
@ 2017-11-08 12:07 Arnd Bergmann
  2017-11-08 15:24 ` Michael S. Tsirkin
  0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2017-11-08 12:07 UTC (permalink / raw)
  To: Michael S. Tsirkin
  Cc: Arnd Bergmann, Greg Kroah-Hartman, Philippe Ombredanne,
	Thomas Gleixner, linux-kernel

The new balloon_page_push/balloon_page_pop helpers got added
inside of an #ifdef, causing a build failure when CONFIG_BALLOON_COMPACTION
is disabled:

drivers/virtio/virtio_balloon.c: In function 'fill_balloon':
drivers/virtio/virtio_balloon.c:164:3: error: implicit declaration of function 'balloon_page_push'

This adds another empty stub function for the case that
CONFIG_BALLOON_COMPACTION is disabled.

Fixes: f09517b35de8 ("virtio_balloon: fix deadlock on OOM")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
I couldn't easily figure out whether the new functions were indeed
intended to be only used when BALLOON_COMPACTION is enabled, or
whether they should always be there. In case I picked the wrong
one of the two, the answer would obviously be to move the
definitions outside of the #ifdef, or into a different file.
---
 include/linux/balloon_compaction.h | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/include/linux/balloon_compaction.h b/include/linux/balloon_compaction.h
index 36734ff07213..730b962fd572 100644
--- a/include/linux/balloon_compaction.h
+++ b/include/linux/balloon_compaction.h
@@ -223,6 +223,15 @@ static inline int balloon_page_migrate(struct page *newpage,
 	return 0;
 }
 
+static inline void balloon_page_push(struct list_head *pages, struct page *page)
+{
+}
+
+static inline struct page *balloon_page_pop(struct list_head *pages)
+{
+	return NULL;
+}
+
 static inline gfp_t balloon_mapping_gfp_mask(void)
 {
 	return GFP_HIGHUSER;
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-11-08 15:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-08 12:07 [PATCH] virtio_balloon: fix build regression Arnd Bergmann
2017-11-08 15:24 ` Michael S. Tsirkin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox