mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-12 05:48:39 +08:00
2a3dcbccd6
Decrement the refcount of the parent dentry's fid after walking
each path component during a full path walk for a lookup. Failure to do
so can lead to fids that are not clunked until the filesystem is
unmounted, as indicated by this warning:
9pnet: found fid 3 not clunked
The improper refcounting after walking resulted in open(2) returning
-EIO on any directories underneath the mount point when using the virtio
transport. When using the fd transport, there's no apparent issue until
the filesytem is unmounted and the warning above is emitted to the logs.
In some cases, the user may not yet be attached to the filesystem and a
new root fid, associated with the user, is created and attached to the
root dentry before the full path walk is performed. Increment the new
root fid's refcount to two in that situation so that it can be safely
decremented to one after it is used for the walk operation. The new fid
will still be attached to the root dentry when
v9fs_fid_lookup_with_uid() returns so a final refcount of one is
correct/expected.
Link: https://lkml.kernel.org/r/20220527000003.355812-2-tyhicks@linux.microsoft.com
Link: https://lkml.kernel.org/r/20220612085330.1451496-4-asmadeus@codewreck.org
Fixes:
|
||
---|---|---|
.. | ||
acl.c | ||
acl.h | ||
cache.c | ||
cache.h | ||
fid.c | ||
fid.h | ||
Kconfig | ||
Makefile | ||
v9fs_vfs.h | ||
v9fs.c | ||
v9fs.h | ||
vfs_addr.c | ||
vfs_dentry.c | ||
vfs_dir.c | ||
vfs_file.c | ||
vfs_inode_dotl.c | ||
vfs_inode.c | ||
vfs_super.c | ||
xattr.c | ||
xattr.h |