OOPS, typed rutgers.edu by mistake...
---------- Forwarded message ----------
Date: Wed, 23 Aug 2000 07:01:08 +0100 (BST)
From: Tigran Aivazian <tigran@veritas.com>
To: Alexander Viro <aviro@redhat.com>
Cc: linux-kernel@vger.rutgers.edu
Subject: [patch-2.4.0-test7-pre7] close_on_exec fix.
Hi Alexander,
Do you know why include/linux/file.h:get_close_on_exec() takes
files->file_lock for WRITE and not for READ? The patch below fixes this.
All places which modify close_on_exec take it for WRITE but that doesn't
mean that readers can't take it for READ.
Regards,
Tigran
--- linux/include/linux/file.h Wed Aug 23 06:58:09 2000
+++ work/include/linux/file.h Wed Aug 23 06:58:24 2000
@@ -12,9 +12,9 @@
{
struct files_struct *files = current->files;
int res;
- write_lock(&files->file_lock);
+ read_lock(&files->file_lock);
res = FD_ISSET(fd, files->close_on_exec);
- write_unlock(&files->file_lock);
+ read_unlock(&files->file_lock);
return res;
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Wed Aug 23 2000 - 21:00:07 EST