linux/fs/9p
Dominique Martinet b0017602fd 9p: fix EBADF errors in cached mode
cached operations sometimes need to do invalid operations (e.g. read
on a write only file)
Historic fscache had added a "writeback fid", a special handle opened
RW as root, for this. The conversion to new fscache missed that bit.

This commit reinstates a slightly lesser variant of the original code
that uses the writeback fid for partial pages backfills if the regular
user fid had been open as WRONLY, and thus would lack read permissions.

Link: https://lkml.kernel.org/r/20220614033802.1606738-1-asmadeus@codewreck.org
Fixes: eb497943fa ("9p: Convert to using the netfs helper lib to do reads and caching")
Cc: stable@vger.kernel.org
Cc: David Howells <dhowells@redhat.com>
Reported-By: Christian Schoenebeck <linux_oss@crudebyte.com>
Reviewed-by: Christian Schoenebeck <linux_oss@crudebyte.com>
Tested-by: Christian Schoenebeck <linux_oss@crudebyte.com>
Signed-off-by: Dominique Martinet <asmadeus@codewreck.org>
2022-06-17 06:03:30 +09:00
..
acl.c 9p: fix a bunch of checkpatch warnings 2021-11-04 21:04:25 +09:00
acl.h 9p: fix a bunch of checkpatch warnings 2021-11-04 21:04:25 +09:00
cache.c netfs: Fix gcc-12 warning by embedding vfs inode in netfs_i_context 2022-06-09 13:55:00 -07:00
cache.h 9p: Use fscache indexing rewrite and reenable caching 2022-01-10 11:53:06 +00:00
fid.c 9p: Fix refcounting during full path walks for fid lookups 2022-06-15 12:05:33 +09:00
fid.h 9p: apply review requests for fid refcounting 2020-11-19 17:21:34 +01:00
Kconfig 9p: Use fscache indexing rewrite and reenable caching 2022-01-10 11:53:06 +00:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
v9fs_vfs.h 9p: fix a bunch of checkpatch warnings 2021-11-04 21:04:25 +09:00
v9fs.c netfs: Fix gcc-12 warning by embedding vfs inode in netfs_i_context 2022-06-09 13:55:00 -07:00
v9fs.h netfs: Further cleanups after struct netfs_inode wrapper introduced 2022-06-10 20:55:21 +01:00
vfs_addr.c 9p: fix EBADF errors in cached mode 2022-06-17 06:03:30 +09:00
vfs_dentry.c 9p: fix a bunch of checkpatch warnings 2021-11-04 21:04:25 +09:00
vfs_dir.c 9p: Use fscache indexing rewrite and reenable caching 2022-01-10 11:53:06 +00:00
vfs_file.c 9p-for-5.17-rc1: fixes, split 9p_net_fd, new reviewer 2022-01-16 07:36:49 +02:00
vfs_inode_dotl.c 9p: fix fid refcount leak in v9fs_vfs_atomic_open_dotl 2022-06-15 12:05:21 +09:00
vfs_inode.c 9p: fix fid refcount leak in v9fs_vfs_get_link 2022-06-15 12:05:29 +09:00
vfs_super.c 9p: Copy local writes to the cache when writing to the server 2022-01-10 11:53:25 +00:00
xattr.c 9p: fix file headers 2021-11-03 17:45:04 +09:00
xattr.h 9p: fix a bunch of checkpatch warnings 2021-11-04 21:04:25 +09:00