diff options
author | Greg Kurz <gkurz@linux.vnet.ibm.com> | 2020-09-23 22:11:44 +0800 |
---|---|---|
committer | Dominique Martinet <asmadeus@codewreck.org> | 2020-11-03 09:29:46 +0100 |
commit | 987a64850996db22bbcf2c1d0a051446a343fa2c (patch) | |
tree | 70596e685ff828cc5225956c3426d5f559eb5f28 /fs/9p/vfs_file.c | |
parent | 154372e67d4053e56591245eb413686621941333 (diff) |
fs/9p: track open fids
This patch adds accounting of open fids in a list hanging off the i_private
field of the corresponding inode. This allows faster lookups compared to
searching the full 9p client list.
The lookup code is modified accordingly.
Link: http://lkml.kernel.org/r/20200923141146.90046-3-jianyong.wu@arm.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>
Diffstat (limited to 'fs/9p/vfs_file.c')
-rw-r--r-- | fs/9p/vfs_file.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/9p/vfs_file.c b/fs/9p/vfs_file.c index b177fd3b1eb3..b0ef225cecd0 100644 --- a/fs/9p/vfs_file.c +++ b/fs/9p/vfs_file.c @@ -96,6 +96,7 @@ int v9fs_file_open(struct inode *inode, struct file *file) mutex_unlock(&v9inode->v_mutex); if (v9ses->cache == CACHE_LOOSE || v9ses->cache == CACHE_FSCACHE) v9fs_cache_inode_set_cookie(inode, file); + v9fs_open_fid_add(inode, fid); return 0; out_error: p9_client_clunk(file->private_data); |