Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 130701790bf2d95e902edf16031ff596 > files > 59

autofs-5.0.1-0.rc2.164.el5_8.src.rpm

autofs-5.0.1 - fix fix wait for master source mutex

From: Ian Kent <raven@themaw.net>

The "wait for master source mutex" change wait for a busy read/write
mutex to become available instead of failing. The s390x architecture
is slower than the Intel architectures and the time allowed to wait
can be too short leading to a failure anyway.

This patch increases the maximum wait from 1 second to 5 seconds to
avoid false positive fails.

Also, fix a compile error introduced by the, apparently unused,
recently added definition of "struct list_head" in
"/usr/include/linux/types.h"

---

 include/list.h |    5 +++--
 lib/master.c   |    2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)


--- autofs-5.0.1.orig/lib/master.c
+++ autofs-5.0.1/lib/master.c
@@ -559,7 +559,7 @@ void master_source_writelock(struct mast
 
 void master_source_readlock(struct master_mapent *entry)
 {
-	int retries = 5; /* 1 second maximum */
+	int retries = 25; /* 5 second maximum */
 	int status;
 
 	while (retries--) {
--- autofs-5.0.1.orig/include/list.h
+++ autofs-5.0.1/include/list.h
@@ -11,9 +11,10 @@
  * using the generic single-entry routines.
  */
 
-struct list_head {
-	struct list_head *next, *prev;
+struct my_list_head {
+	struct my_list_head *next, *prev;
 };
+#define list_head my_list_head
 
 #define LIST_HEAD_INIT(name) { &(name), &(name) }