linux-stable/fs/9p
Eric Van Hensbergen 154372e67d fs/9p: fix create-unlink-getattr idiom
Fixes several outstanding bug reports of not being able to getattr from an
open file after an unlink.  This patch cleans up transient fids on an unlink
and will search open fids on a client if it detects a dentry that appears to
have been unlinked.  This search is necessary because fstat does not pass fd
information through the VFS API to the filesystem, only the dentry which for
9p has an imperfect match to fids.

Inherent in this patch is also a fix for the qid handling on create/open
which apparently wasn't being set correctly and was necessary for the search
to succeed.

A possible optimization over this fix is to include accounting of open fids
with the inode in the private data (in a similar fashion to the way we track
transient fids with dentries).  This would allow a much quicker search for
a matching open fid.

(changed v9fs_fid_find_global to v9fs_fid_find_inode in comment)

Link: http://lkml.kernel.org/r/20200923141146.90046-2-jianyong.wu@arm.com
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com>
Signed-off-by: Jianyong Wu <jianyong.wu@arm.com>
Signed-off-by: Dominique Martinet <asmadeus@codewreck.org>
2020-11-03 09:29:31 +01:00
..
acl.c 9p: acl: fix uninitialized iattr access 2018-09-08 01:51:50 +09:00
acl.h 9p: switch v9fs_set_create_acl() to inode+fid, do it before d_instantiate() 2013-02-26 02:46:07 -05:00
cache.c 9p/cache.c: Fix memory leak in v9fs_cache_session_get_cookie 2019-09-03 11:07:39 +00:00
cache.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 188 2019-05-30 11:29:21 -07:00
fid.c fs/9p: fix create-unlink-getattr idiom 2020-11-03 09:29:31 +01:00
fid.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 188 2019-05-30 11:29:21 -07:00
Kconfig 9p: Fix Kconfig indentation 2020-03-27 09:29:56 +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.c 9p: Fix memory leak in v9fs_mount 2020-07-19 14:58:47 +02:00
v9fs.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 188 2019-05-30 11:29:21 -07:00
v9fs_vfs.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 188 2019-05-30 11:29:21 -07:00
vfs_addr.c 9p: pass the correct prototype to read_cache_page 2019-07-12 11:05:43 -07:00
vfs_dentry.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 188 2019-05-30 11:29:21 -07:00
vfs_dir.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 188 2019-05-30 11:29:21 -07:00
vfs_file.c 9p pull request for inclusion in 5.10 2020-10-22 09:33:20 -07:00
vfs_inode.c fs/9p: fix create-unlink-getattr idiom 2020-11-03 09:29:31 +01:00
vfs_inode_dotl.c 9p: retrieve fid from file when file instance exist. 2020-07-19 14:58:47 +02:00
vfs_super.c Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2020-10-24 12:26:05 -07:00
xattr.c iov_iter: Separate type from direction and use accessor functions 2018-10-24 00:41:07 +01:00
xattr.h 9p: xattr simplifications 2015-11-13 20:34:33 -05:00