Eric Biggers
14e43bf435
vfs: don't unnecessarily clone write access for writable fds
...
There's no need for mnt_want_write_file() to increment mnt_writers when
the file is already open for writing, provided that
mnt_drop_write_file() is changed to conditionally decrement it.
We seem to have ended up in the current situation because
mnt_want_write_file() used to be paired with mnt_drop_write(), due to
mnt_drop_write_file() not having been added yet. So originally
mnt_want_write_file() had to always increment mnt_writers.
But later mnt_drop_write_file() was added, and all callers of
mnt_want_write_file() were paired with it. This makes the compatibility
between mnt_want_write_file() and mnt_drop_write() no longer necessary.
Therefore, make __mnt_want_write_file() and __mnt_drop_write_file() skip
incrementing mnt_writers on files already open for writing. This
removes the only caller of mnt_clone_write(), so remove that too.
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2021-01-04 14:02:08 -05:00
..
2020-12-14 23:21:50 +01:00
2020-12-17 12:52:23 -08:00
2020-12-16 16:38:41 -08:00
2020-12-15 16:18:23 -08:00
2020-12-16 16:38:41 -08:00
2020-12-17 10:11:29 -08:00
2020-12-16 18:48:16 +01:00
2020-12-11 22:29:38 -08:00
2020-12-23 15:06:22 -08:00
2020-12-11 13:23:06 +00:00
2020-12-22 14:12:10 -08:00
2020-12-17 12:52:23 -08:00
2020-12-15 14:10:09 -08:00
2020-12-17 12:15:03 -08:00
2020-12-15 13:54:56 -08:00
2020-12-12 12:31:54 +01:00
2020-12-15 22:46:16 -08:00
2020-12-15 22:46:15 -08:00
2020-12-16 13:09:32 -08:00
2020-12-16 12:57:51 -08:00
2020-12-11 14:02:14 -08:00
2020-12-14 15:26:13 +01:00
2020-12-15 12:13:40 -08:00
2020-12-20 17:17:25 -08:00
2020-12-20 17:17:01 -08:00
2020-12-15 12:13:45 -08:00
2020-12-19 11:18:38 -08:00
2020-12-15 23:41:19 -08:00
2020-12-16 11:06:49 -08:00
2020-12-16 10:45:11 -08:00
2020-12-15 19:24:18 +01:00
2020-12-15 22:46:15 -08:00
2020-12-11 14:10:44 +01:00
2020-12-15 10:57:29 +01:00
2020-12-22 13:19:43 -08:00
2020-12-16 16:38:41 -08:00
2020-12-11 21:20:08 +05:30
2020-12-14 11:51:46 +01:00
2020-12-14 16:24:19 +01:00
2020-12-11 14:02:14 -08:00
2020-12-16 12:33:35 -08:00
2020-12-14 12:18:19 -08:00
2020-12-25 10:54:29 -08:00
2020-12-17 11:18:00 -08:00
2020-12-15 12:13:41 -08:00
2020-12-15 12:53:37 -08:00
2020-12-15 12:13:44 -08:00
2020-12-16 11:06:07 -08:00
2020-12-15 16:19:30 +01:00
2020-12-15 22:46:15 -08:00
2020-12-15 16:39:06 -08:00
2020-12-15 16:19:30 +01:00
2020-12-15 16:19:31 +01:00
2020-12-15 15:03:31 -08:00
2020-12-17 13:30:45 -05:00
2020-12-22 12:55:08 -08:00
2020-12-22 12:55:09 -08:00
2020-12-15 16:19:31 +01:00
2020-12-15 22:46:15 -08:00
2020-12-17 13:22:17 -08:00
2020-12-15 13:22:29 -08:00
2020-12-15 22:46:16 -08:00
2020-12-16 11:01:04 -08:00
2020-12-15 22:46:15 -08:00
2020-12-19 11:18:37 -08:00
2020-12-17 13:34:25 -08:00
2020-12-15 14:10:09 -08:00
2020-12-15 12:13:45 -08:00
2020-12-15 14:55:10 -08:00
2020-12-22 12:55:09 -08:00
2020-12-15 12:13:41 -08:00
2020-12-19 11:18:37 -08:00
2020-12-15 14:48:04 -08:00
2020-12-17 13:01:31 -08:00
2020-12-22 12:55:08 -08:00
2021-01-04 14:02:08 -05:00
2020-12-16 11:43:25 -08:00
2020-12-15 14:02:26 -08:00
2020-12-15 12:13:38 -08:00
2020-12-22 12:55:08 -08:00
2020-12-15 14:55:10 -08:00
2020-12-15 12:13:39 -08:00
2020-12-15 15:11:08 -06:00
2020-12-14 17:34:12 -08:00
2020-12-16 13:08:18 -08:00
2020-12-15 15:03:31 -08:00
2020-12-15 15:26:14 +01:00
2020-12-15 12:13:46 -08:00
2020-12-15 15:03:31 -08:00
2020-12-15 22:46:15 -08:00
2020-12-17 14:19:01 +01:00
2020-12-15 22:46:15 -08:00
2020-12-15 22:46:18 -08:00
2020-12-15 22:46:18 -08:00
2020-12-15 12:13:39 -08:00
2020-12-20 10:12:06 -08:00
2020-12-15 15:57:25 -08:00
2020-12-22 12:55:07 -08:00
2020-12-16 16:38:41 -08:00
2020-12-16 11:30:10 -08:00
2020-12-16 11:01:04 -08:00
2020-12-15 12:13:43 -08:00
2020-12-15 12:13:39 -08:00
2020-12-15 12:13:37 -08:00
2020-12-22 12:55:08 -08:00
2020-12-15 14:48:04 -08:00
2020-12-11 15:43:41 -05:00
2020-12-19 11:18:38 -08:00
2020-12-11 14:11:13 +01:00
2020-12-14 16:40:27 -08:00
2020-12-16 00:07:17 -08:00
2020-12-16 12:33:35 -08:00
2020-12-15 22:46:15 -08:00
2020-12-18 16:14:31 -05:00
2020-12-15 12:13:41 -08:00
2020-12-15 12:13:40 -08:00