kernel-hacking-2024-linux-s.../fs
Dominique Martinet 22e424feb6 Revert "fs/9p: search open fids first"
This reverts commit 478ba09edc.

That commit was meant as a fix for setattrs with by fd (e.g. ftruncate)
to use an open fid instead of the first fid it found on lookup.
The proper fix for that is to use the fid associated with the open file
struct, available in iattr->ia_file for such operations, and was
actually done just before in 6624664160 ("9p: retrieve fid from file
when file instance exist.")
As such, this commit is no longer required.

Furthermore, changing lookup to return open fids first had unwanted side
effects, as it turns out the protocol forbids the use of open fids for
further walks (e.g. clone_fid) and we broke mounts for some servers
enforcing this rule.

Note this only reverts to the old working behaviour, but it's still
possible for lookup to return open fids if dentry->d_fsdata is not set,
so more work is needed to make sure we respect this rule in the future,
for example by adding a flag to the lookup functions to only match
certain fid open modes depending on caller requirements.

Link: https://lkml.kernel.org/r/20220130130651.712293-1-asmadeus@codewreck.org
Fixes: 478ba09edc ("fs/9p: search open fids first")
Cc: stable@vger.kernel.org # v5.11+
Reported-by: ron minnich <rminnich@gmail.com>
Reported-by: ng@0x80.stream
Signed-off-by: Dominique Martinet <asmadeus@codewreck.org>
2022-01-30 22:13:37 +09:00
..
9p Revert "fs/9p: search open fids first" 2022-01-30 22:13:37 +09:00
adfs fs/adfs: remove unneeded variable make code cleaner 2022-01-20 08:52:55 +02:00
affs
afs proc: remove PDE_DATA() completely 2022-01-22 08:33:37 +02:00
autofs
befs
bfs
btrfs mm: remove cleancache 2022-01-22 08:33:38 +02:00
cachefiles cachefiles: Check that the backing filesystem supports tmpfiles 2022-01-21 21:36:28 +00:00
ceph fscache fixes 2022-01-22 10:59:32 +02:00
cifs cifs: update internal module number 2022-01-19 23:14:34 -06:00
coda
configfs
cramfs
crypto
debugfs debugfs: lockdown: Allow reading debugfs files that are not world readable 2022-01-06 15:47:41 +01:00
devpts
dlm driver core changes for 5.17-rc1 2022-01-12 11:11:34 -08:00
ecryptfs
efivarfs
efs
erofs dax + libnvdimm for v5.17 2022-01-12 15:46:11 -08:00
exfat exfat: fix missing REQ_SYNC in exfat_update_bhs() 2022-01-10 11:00:04 +09:00
exportfs
ext2
ext4 mm: remove cleancache 2022-01-22 08:33:38 +02:00
f2fs bitmap patches for 5.17-rc1 2022-01-23 06:20:44 +02:00
fat FAT: use io_schedule_timeout() instead of congestion_wait() 2022-01-20 08:52:54 +02:00
freevxfs
fscache fscache: Fix the volume collision wait condition 2022-01-21 21:36:28 +00:00
fuse virtio,vdpa,qemu_fw_cfg: features, cleanups, fixes 2022-01-18 10:05:48 +02:00
gfs2 driver core changes for 5.17-rc1 2022-01-12 11:11:34 -08:00
hfs
hfsplus hfsplus: use struct_group_attr() for memcpy() region 2022-01-20 08:52:54 +02:00
hostfs hostfs: Fix writeback of dirty pages 2021-12-21 21:44:27 +01:00
hpfs
hugetlbfs hugetlbfs: fix off-by-one error in hugetlb_vmdelete_list() 2022-01-15 16:30:30 +02:00
iomap dax + libnvdimm for v5.17 2022-01-12 15:46:11 -08:00
isofs
jbd2 proc: remove PDE_DATA() completely 2022-01-22 08:33:37 +02:00
jffs2 Merge branch 'signal-for-v5.17' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace 2022-01-17 05:49:30 +02:00
jfs
kernfs
ksmbd 23 ksmbd server fixes 2022-01-20 13:39:13 +02:00
lockd Merge branch 'signal-for-v5.17' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace 2022-01-17 05:49:30 +02:00
minix
netfs netfs: Make ops->init_rreq() optional 2022-01-21 21:36:28 +00:00
nfs Merge branch 'signal-for-v5.17' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace 2022-01-17 05:49:30 +02:00
nfs_common
nfsd Merge branch 'signal-for-v5.17' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace 2022-01-17 05:49:30 +02:00
nilfs2 Merge branch 'akpm' (patches from Andrew) 2022-01-20 10:41:01 +02:00
nls
notify inotify: simplify subdirectory registration with register_sysctl() 2022-01-22 08:33:35 +02:00
ntfs fs/ntfs/attrib.c: fix one kernel-doc comment 2022-01-15 16:30:24 +02:00
ntfs3 mm: remove cleancache 2022-01-22 08:33:38 +02:00
ocfs2 bitmap patches for 5.17-rc1 2022-01-23 06:20:44 +02:00
omfs
openpromfs
orangefs orangefs: Fix the size of a memory allocation in orangefs_bufmap_alloc() 2021-12-31 14:37:43 -05:00
overlayfs
proc proc: remove PDE_DATA() completely 2022-01-22 08:33:37 +02:00
pstore pstore update for v5.17-rc1 2022-01-10 11:48:37 -08:00
qnx4
qnx6
quota
ramfs
reiserfs
romfs
smbfs_common smb3: add new defines from protocol specification 2022-01-18 16:50:47 -06:00
squashfs squashfs: provide backing_dev_info in order to disable read-ahead 2022-01-15 16:30:24 +02:00
sysfs
sysv
tracefs Tracing updates for 5.17: 2022-01-16 10:15:32 +02:00
ubifs ubifs: read-only if LEB may always be taken in ubifs_garbage_collect 2021-12-23 22:30:38 +01:00
udf udf: Fix error handling in udf_new_inode() 2021-12-15 13:08:34 +01:00
ufs
unicode unicode: fix .gitignore for generated utfdata file 2022-01-17 07:26:43 +02:00
vboxsf
verity
xfs New code for 5.17: 2022-01-22 11:04:27 +02:00
zonefs zonefs: add MODULE_ALIAS_FS 2021-12-17 16:56:35 +09:00
aio.c aio: move aio sysctl to aio.c 2022-01-22 08:33:34 +02:00
anon_inodes.c
attr.c
bad_inode.c
binfmt_aout.c
binfmt_elf.c fs/binfmt_elf: use PT_LOAD p_align values for static PIE 2022-01-20 08:52:54 +02:00
binfmt_elf_fdpic.c
binfmt_flat.c
binfmt_misc.c fs: move binfmt_misc sysctl to its own file 2022-01-22 08:33:35 +02:00
binfmt_script.c
buffer.c fs/buffer: Convert __block_write_begin_int() to take a folio 2021-12-16 15:49:51 -05:00
char_dev.c
compat_binfmt_elf.c
coredump.c fs/coredump: move coredump sysctls into its own file 2022-01-22 08:33:36 +02:00
d_path.c
dax.c dax: remove the copy_from_iter and copy_to_iter methods 2021-12-18 08:04:53 -08:00
dcache.c fs: move dcache sysctls to its own file 2022-01-22 08:33:36 +02:00
direct-io.c
drop_caches.c
eventfd.c
eventpoll.c eventpoll: simplify sysctl declaration with register_sysctl() 2022-01-22 08:33:35 +02:00
exec.c fs/coredump: move coredump sysctls into its own file 2022-01-22 08:33:36 +02:00
fcntl.c
fhandle.c
file.c fget: clarify and improve __fget_files() implementation 2021-12-13 10:55:30 -08:00
file_table.c fs: move fs stat sysctls to file_table.c 2022-01-22 08:33:36 +02:00
filesystems.c
fs-writeback.c fscache rewrite 2022-01-12 13:45:12 -08:00
fs_context.c vfs: fs_context: fix up param length parsing in legacy_parse_param 2022-01-18 09:23:19 +02:00
fs_parser.c
fs_pin.c
fs_struct.c
fs_types.c
fsopen.c
init.c
inode.c fs: move inode sysctls to its own file 2022-01-22 08:33:35 +02:00
internal.h fs/buffer: Convert __block_write_begin_int() to take a folio 2021-12-16 15:49:51 -05:00
io-wq.c io_uring-5.17-2022-01-21 2022-01-21 16:07:21 +02:00
io-wq.h Merge branch 'signal-for-v5.17' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace 2022-01-17 05:49:30 +02:00
io_uring.c io_uring: perform poll removal even if async work removal is successful 2022-01-18 19:28:43 -07:00
ioctl.c fs/ioctl: remove unnecessary __user annotation 2022-01-15 16:30:25 +02:00
Kconfig cachefiles: Introduce rewritten driver 2022-01-07 13:40:39 +00:00
Kconfig.binfmt
kernel_read_file.c
libfs.c
locks.c fs: move locking sysctls where they are used 2022-01-22 08:33:36 +02:00
Makefile fs: move namespace sysctls and declare fs base directory 2022-01-22 08:33:36 +02:00
mbcache.c
mount.h
mpage.c mm: remove cleancache 2022-01-22 08:33:38 +02:00
namei.c fs: move namei sysctls to its own file 2022-01-22 08:33:36 +02:00
namespace.c fs: move namespace sysctls and declare fs base directory 2022-01-22 08:33:36 +02:00
no-block.c
nsfs.c
open.c
pipe.c fs: move pipe sysctls to is own file 2022-01-22 08:33:36 +02:00
pnode.c
pnode.h
posix_acl.c
proc_namespace.c
read_write.c
readdir.c
remap_range.c fs: Convert vfs_dedupe_file_range_compare to folios 2022-01-08 00:28:41 -05:00
select.c select: Fix indefinitely sleeping task in poll_schedule_timeout() 2022-01-11 09:03:05 -08:00
seq_file.c
signalfd.c Merge branch 'signal-for-v5.17' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace 2022-01-17 05:49:30 +02:00
splice.c
stack.c
stat.c
statfs.c
super.c mm: remove cleancache 2022-01-22 08:33:38 +02:00
sync.c
sysctls.c fs: move namespace sysctls and declare fs base directory 2022-01-22 08:33:36 +02:00
timerfd.c
userfaultfd.c mm: move anon_vma declarations to linux/mm_inline.h 2022-01-15 16:30:27 +02:00
utimes.c
xattr.c