diff options
| author | NeilBrown <neil@brown.name> | 2026-07-15 09:04:12 +1000 |
|---|---|---|
| committer | Christian Brauner <brauner@kernel.org> | 2026-07-23 15:42:48 +0200 |
| commit | ddb6e6c72a0ab0b1f08ee30e3ab888257d8d3c80 (patch) | |
| tree | 1c0c8ed69fdbfa04a27d6138062a58d80121ed8b /tools/tracing/rtla/tests/scripts/lib/git@git.tavy.me:linux.git | |
| parent | dc59e4fea9d83f03bad6bddf3fa2e52491777482 (diff) | |
VFS: move mnt_want_write() and locking into lookup_open()
The mnt_want_write() call and the parent inode locking in
open_last_lookups() are only needed for lookup_open(). So we can move
them and all the got_write handling into lookup_open().
Note that we need to also check create_error when determining whether to
unlock shared or not, as O_CREAT can be cleared, but create_error is
only set of O_CREAT was set.
The fsnotify calls come too as they must be in the locked region.
Also use the existing dir_inode uniformly for dir->d_inode.
This is a step towards exporting an better "open/create" interface to nfsd.
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Jori Koolstra <jkoolstra@xs4all.nl>
Signed-off-by: NeilBrown <neil@brown.name>
Link: https://patch.msgid.link/20260714230534.776886-2-neilb@ownmail.net
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
Diffstat (limited to 'tools/tracing/rtla/tests/scripts/lib/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions
