[RFC PATCH 6/6] fs/9p: non-.L: Refresh stale inodes on reuse
Tingmao Wang
m at maowtm.org
Sun Apr 6 20:43:07 UTC 2025
This replicates the previous .L commit for non-.L
Signed-off-by: Tingmao Wang <m at maowtm.org>
---
fs/9p/vfs_inode.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c
index 1137a5960ac2..3f087b0bf1bf 100644
--- a/fs/9p/vfs_inode.c
+++ b/fs/9p/vfs_inode.c
@@ -498,8 +498,14 @@ static struct inode *v9fs_qid_iget(struct super_block *sb, struct p9_qid *qid,
if (!inode)
return ERR_PTR(-ENOMEM);
- if (!(inode->i_state & I_NEW))
+ if (!(inode->i_state & I_NEW)) {
+ /* See explanation in v9fs_qid_iget_dotl */
+ if (new) {
+ v9fs_stat2inode(st, inode, sb,
+ (v9ses->cache & CACHE_LOOSE) ? V9FS_STAT2INODE_KEEP_ISIZE : 0);
+ }
return inode;
+ }
/*
* initialize the inode with the stat info
* FIXME!! we may need support for stale inodes
--
2.39.5
More information about the Linux-security-module-archive
mailing list