Al Viro f8ad850f11 try to get rid of races in hostfs open()
In case of mode mismatch, do *not* blindly close the descriptor
another openers might be using right now.  Open the underlying
file with currently sufficient mode, then
	* if current mode has grown so that it's sufficient for
us now, just close our new fd
	* if current mode has grown and our fd is *not* enough
to cover it, close and repeat.
	* otherwise, install our fd if the file hadn't been
opened at all or dup2() our fd over the current one (and close
our fd).
Critical section is protected by mutex; yes, system-wide.  All
we do under it is a bunch of comparison and maybe an overwriting
dup2() on host.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-08-09 16:48:15 -04:00
..
2010-08-09 16:47:37 -04:00
2010-08-09 16:48:06 -04:00
2010-05-27 09:12:41 -07:00
2010-08-09 16:47:51 -04:00
2010-05-19 22:41:57 -04:00
2010-08-09 16:47:41 -04:00
2010-08-09 16:48:03 -04:00
2010-08-09 16:47:37 -04:00
2010-08-09 16:48:01 -04:00
2010-08-09 16:47:43 -04:00
2010-08-09 16:47:43 -04:00
2010-08-09 16:47:37 -04:00
2010-08-09 16:47:26 -04:00
2010-08-09 16:47:49 -04:00
2010-08-09 16:47:37 -04:00
2010-08-09 16:47:37 -04:00
2010-08-09 16:47:37 -04:00
2010-08-09 16:48:05 -04:00
2010-08-09 16:47:52 -04:00
2010-08-09 16:47:31 -04:00
2010-08-09 16:48:00 -04:00
2010-08-09 16:47:53 -04:00
2010-08-09 16:47:59 -04:00
2010-08-09 16:47:37 -04:00
2010-08-09 16:48:02 -04:00
2010-08-09 16:47:44 -04:00
2010-08-09 16:47:33 -04:00
2010-08-09 16:48:13 -04:00
2010-05-11 17:43:58 +02:00
2010-08-09 16:47:49 -04:00
2010-05-21 18:31:16 -04:00
2010-05-21 18:31:17 -04:00
2010-05-18 08:57:00 +10:00
2010-05-21 18:31:17 -04:00
2010-06-10 19:08:34 +02:00
2010-05-27 09:12:56 -07:00
2010-05-21 18:31:17 -04:00
2010-06-29 10:38:22 -07:00
2010-08-09 16:47:43 -04:00