OpenCloudOS-Kernel/Documentation
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
..
ABI More power management updates for 5.11-rc1 2020-12-22 14:12:10 -08:00
PCI
RCU docs/rcu: Update the call_rcu() API 2020-11-06 17:02:43 -08:00
accounting
admin-guide A small set of late-arriving, small documentation fixes. 2020-12-24 14:20:33 -08:00
arm ARM updates for 5.11: 2020-12-22 13:34:27 -08:00
arm64 ARM: 2020-12-20 10:44:05 -08:00
block block-5.10-2020-10-24 2020-10-24 12:46:42 -07:00
bpf
cdrom
core-api Generic interrupt and irqchips subsystem: 2020-12-15 15:03:31 -08:00
cpu-freq
crypto
dev-tools Merge branch 'akpm' (patches from Andrew) 2020-12-22 13:38:17 -08:00
devicetree Devicetree fixes for v5.11, take 1: 2020-12-24 12:09:48 -08:00
doc-guide kernel-doc: Fix example in Nested structs/unions 2020-12-08 10:23:17 -07:00
driver-api RTC for 5.11 2020-12-20 10:12:06 -08:00
fault-injection A handful of late-arriving documentation fixes. 2020-10-23 17:13:53 -07:00
fb drm fixes (round two) for 5.10-rc1 2020-10-23 13:56:34 -07:00
features ARM updates for 5.11: 2020-12-22 13:34:27 -08:00
filesystems vfs: don't unnecessarily clone write access for writable fds 2021-01-04 14:02:08 -05:00
firmware-guide Documentation: ACPI: enumeration: add PCI hierarchy representation 2020-11-23 17:59:49 +01:00
firmware_class
fpga
gpu drm/docs: Fix todo.rst 2020-11-18 11:51:58 +01:00
hid Merge branch 'for-5.11/core' into for-linus 2020-12-16 11:38:38 +01:00
hwmon hwmon: (sbtsi) Add documentation 2020-12-12 08:34:29 -08:00
i2c
ia64 docs: archis: add a per-architecture features list 2020-12-03 15:10:15 -07:00
ide
iio
infiniband
input Input: document inhibiting 2020-12-02 22:10:37 -08:00
isdn
kbuild Kconfig updates for v5.11 2020-12-22 14:04:25 -08:00
kernel-hacking
leds Changes for 5.11-rc1. Small cleanups/fixes mostly thanks to Marek, 2020-12-16 14:56:29 -08:00
litmus-tests
livepatch
locking Documentation: seqlock: s/LOCKTYPE/LOCKNAME/g 2020-12-09 17:08:49 +01:00
m68k docs: archis: add a per-architecture features list 2020-12-03 15:10:15 -07:00
maintainer
mhi
mips docs: archis: add a per-architecture features list 2020-12-03 15:10:15 -07:00
misc-devices Documentation: remove mic/index from misc-devices/index.rst 2020-11-04 11:38:32 +01:00
netlabel
networking ARM: SoC drivers for v5.11 2020-12-16 16:38:41 -08:00
nios2 docs: nios2: add missing ReST file 2020-12-07 08:35:21 -07:00
nvdimm
openrisc docs: archis: add a per-architecture features list 2020-12-03 15:10:15 -07:00
parisc docs: archis: add a per-architecture features list 2020-12-03 15:10:15 -07:00
pcmcia
power PM: EM: Update Energy Model with new flag indicating power scale 2020-11-10 20:29:28 +01:00
powerpc docs: archis: add a per-architecture features list 2020-12-03 15:10:15 -07:00
process A small set of late-arriving, small documentation fixes. 2020-12-24 14:20:33 -08:00
riscv docs: archis: add a per-architecture features list 2020-12-03 15:10:15 -07:00
s390 docs: archis: add a per-architecture features list 2020-12-03 15:10:15 -07:00
scheduler Power management updates for 5.11-rc1 2020-12-15 16:30:31 -08:00
scsi
security
sh docs: archis: add a per-architecture features list 2020-12-03 15:10:15 -07:00
sound ALSA: usb-audio: Add implicit_fb module option 2020-11-23 15:17:24 +01:00
sparc docs: archis: add a per-architecture features list 2020-12-03 15:10:15 -07:00
sphinx Kbuild updates for v5.11 2020-12-22 14:02:39 -08:00
sphinx-static
spi
staging
target tweewide: Fix most Shebang lines 2020-12-08 23:30:04 +09:00
timers
trace Kbuild updates for v5.11 2020-12-22 14:02:39 -08:00
translations Networking updates for 5.11 2020-12-15 13:22:29 -08:00
usb
userspace-api "Intel SGX is new hardware functionality that can be used by 2020-12-14 13:14:57 -08:00
virt ARM: 2020-12-20 10:44:05 -08:00
vm mm/lru: revise the comments of lru_lock 2020-12-15 14:48:04 -08:00
w1 w1: w1_therm: Rename conflicting sysfs attribute 'eeprom' to 'eeprom_cmd' 2020-11-12 08:50:13 +01:00
watchdog
x86 A much quieter cycle for documentation (happily), with, one hopes, the bulk 2020-12-14 16:55:54 -08:00
xtensa A much quieter cycle for documentation (happily), with, one hopes, the bulk 2020-12-14 16:55:54 -08:00
.gitignore
COPYING-logo
Changes
CodingStyle
Kconfig docs: Kconfig/Makefile: add a check for broken ABI files 2020-10-30 13:08:07 +01:00
Makefile A small number of fixes, plus a build tweak to respect the desire for 2020-11-03 09:57:30 -08:00
SubmittingPatches
asm-annotations.rst
atomic_bitops.txt
atomic_t.txt
conf.py docs: Note that sphinx 1.7 will be required soon 2020-12-11 13:53:38 -07:00
docutils.conf
dontdiff
index.rst docs: archis: add a per-architecture features list 2020-12-03 15:10:15 -07:00
logo.gif
memory-barriers.txt docs/memory-barriers.txt: Fix a typo in CPU MEMORY BARRIERS section 2020-11-06 17:24:51 -08:00
watch_queue.rst