about summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-09-21 05:30:10 +0000
committerUlrich Drepper <drepper@redhat.com>2002-09-21 05:30:10 +0000
commit6f6867815c549cbbaa6808f88172bc22670f7a4f (patch)
tree0e159ebf9b610551b4949b64033368c31fb5d0d5
parent5842a7562c8dd965f9b6b9885396b1966bb0cf87 (diff)
downloadglibc-6f6867815c549cbbaa6808f88172bc22670f7a4f.tar.gz
glibc-6f6867815c549cbbaa6808f88172bc22670f7a4f.tar.xz
glibc-6f6867815c549cbbaa6808f88172bc22670f7a4f.zip
Update.
	* sysdeps/unix/sysv/linux/getsysstats.c (get_proc_path): Avoid
	locking when using mount tab file.
-rw-r--r--ChangeLog3
-rw-r--r--sysdeps/unix/sysv/linux/getsysstats.c3
2 files changed, 6 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 0977e70a4e..7cd3e9c17f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2002-09-20  Ulrich Drepper  <drepper@redhat.com>
 
+	* sysdeps/unix/sysv/linux/getsysstats.c (get_proc_path): Avoid
+	locking when using mount tab file.
+
 	* elf/dl-init.c (_dl_init): Fix test of the size of the
 	preinit_array section.
 	(call_init): Optimize access to DT_INIT_ARRAY entry a bit.
diff --git a/sysdeps/unix/sysv/linux/getsysstats.c b/sysdeps/unix/sysv/linux/getsysstats.c
index f58e2e288a..eaacf3727c 100644
--- a/sysdeps/unix/sysv/linux/getsysstats.c
+++ b/sysdeps/unix/sysv/linux/getsysstats.c
@@ -57,6 +57,9 @@ get_proc_path (char *buffer, size_t bufsize)
     fp = __setmntent (_PATH_MNTTAB, "r");
   if (fp != NULL)
     {
+      /* We don't need locking.  */
+      (void) __fsetlocking (fp, FSETLOCKING_BYCALLER);
+
       while ((entry = __getmntent_r (fp, &mount_point, buffer, bufsize))
 	     != NULL)
 	if (strcmp (mount_point.mnt_type, "proc") == 0)