summary refs log tree commit diff
path: root/libio/iofclose.c
diff options
context:
space:
mode:
Diffstat (limited to 'libio/iofclose.c')
-rw-r--r--libio/iofclose.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/libio/iofclose.c b/libio/iofclose.c
index eb01c88755..da0f9febe4 100644
--- a/libio/iofclose.c
+++ b/libio/iofclose.c
@@ -57,15 +57,13 @@ _IO_new_fclose (fp)
   if (fp->_IO_file_flags & _IO_IS_FILEBUF)
     INTUSE(_IO_un_link) ((struct _IO_FILE_plus *) fp);
 
-  _IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp);
-  _IO_flockfile (fp);
+  _IO_acquire_lock (fp);
   if (fp->_IO_file_flags & _IO_IS_FILEBUF)
     status = INTUSE(_IO_file_close_it) (fp);
   else
     status = fp->_flags & _IO_ERR_SEEN ? -1 : 0;
   _IO_FINISH (fp);
-  _IO_funlockfile (fp);
-  _IO_cleanup_region_end (0);
+  _IO_release_lock (fp);
   if (fp->_mode > 0)
     {
 #if _LIBC