Skip to content
This repository was archived by the owner on Jan 6, 2023. It is now read-only.

Commit a5f3167

Browse files
Julio Montesjcvenegas
authored andcommitted
HACK: 9P: always use cached inode to fill in v9fs_vfs_getattr
So that if in cache=none mode, we don't have to lookup server that might not support open-unlink-fstat operation. Signed-off-by: Peng Tao <[email protected]>
1 parent 55b1957 commit a5f3167

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

fs/9p/vfs_inode.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1068,7 +1068,7 @@ v9fs_vfs_getattr(const struct path *path, struct kstat *stat,
10681068

10691069
p9_debug(P9_DEBUG_VFS, "dentry: %p\n", dentry);
10701070
v9ses = v9fs_dentry2v9ses(dentry);
1071-
if (v9ses->cache == CACHE_LOOSE || v9ses->cache == CACHE_FSCACHE) {
1071+
if (!d_really_is_negative(dentry) || v9ses->cache == CACHE_LOOSE || v9ses->cache == CACHE_FSCACHE) {
10721072
generic_fillattr(d_inode(dentry), stat);
10731073
return 0;
10741074
}

fs/9p/vfs_inode_dotl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ v9fs_vfs_getattr_dotl(const struct path *path, struct kstat *stat,
481481

482482
p9_debug(P9_DEBUG_VFS, "dentry: %p\n", dentry);
483483
v9ses = v9fs_dentry2v9ses(dentry);
484-
if (v9ses->cache == CACHE_LOOSE || v9ses->cache == CACHE_FSCACHE) {
484+
if (!d_really_is_negative(dentry) || v9ses->cache == CACHE_LOOSE || v9ses->cache == CACHE_FSCACHE) {
485485
generic_fillattr(d_inode(dentry), stat);
486486
return 0;
487487
}

0 commit comments

Comments
 (0)