All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] multipath: fix set_oom_adj
@ 2013-01-10 20:16 Benjamin Marzinski
  0 siblings, 0 replies; only message in thread
From: Benjamin Marzinski @ 2013-01-10 20:16 UTC (permalink / raw)
  To: device-mapper development; +Cc: Christophe Varoqui

Fix set_oom_adj() to work correclty if OOM_ADJUST_MIN isn't
defined.

Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
---
 multipathd/main.c |    4 ++++
 1 file changed, 4 insertions(+)

Index: multipath-tools-130109/multipathd/main.c
===================================================================
--- multipath-tools-130109.orig/multipathd/main.c
+++ multipath-tools-130109/multipathd/main.c
@@ -1542,8 +1542,12 @@ set_oom_adj (void)
 				strerror(errno));
 			return;
 		}
+#ifdef OOM_ADJUST_MIN
 		file = "/proc/self/oom_adj";
 		score = OOM_ADJUST_MIN;
+#else
+		retry = 0;
+#endif
 	} while (retry--);
 	condlog(0, "couldn't adjust oom score");
 }

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-01-10 20:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-10 20:16 [PATCH v2] multipath: fix set_oom_adj Benjamin Marzinski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.