From 6f6867815c549cbbaa6808f88172bc22670f7a4f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 21 Sep 2002 05:30:10 +0000 Subject: [PATCH] Update. * sysdeps/unix/sysv/linux/getsysstats.c (get_proc_path): Avoid locking when using mount tab file. --- ChangeLog | 3 +++ sysdeps/unix/sysv/linux/getsysstats.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/ChangeLog b/ChangeLog index 0977e70..7cd3e9c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2002-09-20 Ulrich Drepper + * 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 f58e2e2..eaacf37 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) -- 2.7.4