Skip to contentSkip to conversation

multipath: fix set_oom_adj

PATCH Superseded Benjamin Marzinski 1 participant 1 message Jan 8, 2013 Device mapper

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Benjamin Marzinski

author maintainer
#0 lore raw

PATCH 1/1 multipath: fix set_oom_adj

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

---
 multipathd/main.c |    4 ++++
 1 file changed, 4 insertions(+)
multipathd/main.c +4 -0
Index: multipath-tools-120821/multipathd/main.c
===================================================================
@@ -1561,8 +1561,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");
 }