about summary refs log tree commit diff
path: root/sysdeps/unix
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 /sysdeps/unix
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.
Diffstat (limited to 'sysdeps/unix')
-rw-r--r--sysdeps/unix/sysv/linux/getsysstats.c3
1 files changed, 3 insertions, 0 deletions
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)