1
0
Fork 0
alistair23-linux/include
Al Viro 84a2bd3940 fs/namei.c: keep track of nd->root refcount status
The rules for nd->root are messy:
	* if we have LOOKUP_ROOT, it doesn't contribute to refcounts
	* if we have LOOKUP_RCU, it doesn't contribute to refcounts
	* if nd->root.mnt is NULL, it doesn't contribute to refcounts
	* otherwise it does contribute

terminate_walk() needs to drop the references if they are contributing.
So everything else should be careful not to confuse it, leading to
rather convoluted code.

It's easier to keep track of whether we'd grabbed the reference(s)
explicitly.  Use a new flag for that.  Don't bother with zeroing
nd->root.mnt on unlazy failures and in terminate_walk - it's not
needed anymore (terminate_walk() won't care and the next path_init()
will zero nd->root in !LOOKUP_ROOT case anyway).

Resulting rules for nd->root refcounts are much simpler: they are
contributing iff LOOKUP_ROOT_GRABBED is set in nd->flags.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2019-09-03 09:30:45 -04:00
..
acpi It's been a relatively busy cycle for docs: 2019-07-09 12:34:26 -07:00
asm-generic Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux 2019-07-17 13:13:41 -07:00
clocksource clocksource/drivers: Continue making Hyper-V clocksource ISA agnostic 2019-07-03 11:00:59 +02:00
crypto Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2019-07-08 20:57:08 -07:00
drm drm fixes for -rc1: 2019-07-19 12:29:43 -07:00
dt-bindings ARM: Device-tree updates 2019-07-19 17:19:24 -07:00
keys request_key improvements 2019-07-08 19:19:37 -07:00
kvm KVM: arm/arm64: Support chained PMU counters 2019-07-05 13:56:22 +01:00
linux fs/namei.c: keep track of nd->root refcount status 2019-09-03 09:30:45 -04:00
math-emu
media media updates for v5.3-rc1 2019-07-09 09:47:22 -07:00
misc powerpc updates for 5.3 2019-07-13 16:08:36 -07:00
net tcp: fix tcp_set_congestion_control() use from bpf hook 2019-07-18 20:33:48 -07:00
pcmcia It's been a relatively busy cycle for docs: 2019-07-09 12:34:26 -07:00
ras
rdma RDMA/core: Make rdma_counter.h compile stand alone 2019-07-09 09:44:47 -03:00
scsi SCSI fixes on 20190720 2019-07-20 10:04:58 -07:00
soc ARM: SoC-related driver updates 2019-07-19 17:13:56 -07:00
sound ALSA: hda - Don't resume forcibly i915 HDMI/DP codec 2019-07-16 22:46:13 +02:00
target
trace NFS client updates for Linux 5.3 2019-07-18 14:32:33 -07:00
uapi drm fixes for -rc1: 2019-07-19 12:29:43 -07:00
vdso vdso: Remove superfluous #ifdef __KERNEL__ in vdso/datapage.h 2019-06-26 07:28:09 +02:00
video drm main pull request for v5.3-rc1 (sans mm changes) 2019-07-15 19:04:27 -07:00
xen xen: remove tmem driver 2019-07-17 08:09:58 +02:00
Kbuild kbuild: update compile-test header list for v5.3-rc1 2019-07-20 11:19:29 +09:00