Skip to content
This repository was archived by the owner on Feb 8, 2021. It is now read-only.

Commit 1a4a679

Browse files
committed
Merge pull request #86 from bergwolf/9p-getattr
9p getattr hack
2 parents 8024730 + baa07ce commit 1a4a679

File tree

107 files changed

+45
-2
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+45
-2
lines changed

build/kernel

608 Bytes
Binary file not shown.
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
From 084b4a5aa4b90975f7ac6b4714a6b449430ef4c4 Mon Sep 17 00:00:00 2001
2+
From: Peng Tao <[email protected]>
3+
Date: Wed, 4 May 2016 12:01:22 +0800
4+
Subject: [PATCH] HACK: 9P: always use cached inode to fill in v9fs_vfs_getattr
5+
6+
So that if in cache=none mode, we don't have to lookup server that
7+
might not support open-unlink-fstat operation.
8+
9+
Signed-off-by: Peng Tao <[email protected]>
10+
---
11+
fs/9p/vfs_inode.c | 2 +-
12+
fs/9p/vfs_inode_dotl.c | 2 +-
13+
2 files changed, 2 insertions(+), 2 deletions(-)
14+
15+
diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c
16+
index 5110785..43ebb31 100644
17+
--- a/fs/9p/vfs_inode.c
18+
+++ b/fs/9p/vfs_inode.c
19+
@@ -1059,7 +1059,7 @@ v9fs_vfs_getattr(struct vfsmount *mnt, struct dentry *dentry,
20+
21+
p9_debug(P9_DEBUG_VFS, "dentry: %p\n", dentry);
22+
v9ses = v9fs_dentry2v9ses(dentry);
23+
- if (v9ses->cache == CACHE_LOOSE || v9ses->cache == CACHE_FSCACHE) {
24+
+ if (!d_really_is_negative(dentry) || v9ses->cache == CACHE_LOOSE || v9ses->cache == CACHE_FSCACHE) {
25+
generic_fillattr(d_inode(dentry), stat);
26+
return 0;
27+
}
28+
diff --git a/fs/9p/vfs_inode_dotl.c b/fs/9p/vfs_inode_dotl.c
29+
index cb899af..b1e4205 100644
30+
--- a/fs/9p/vfs_inode_dotl.c
31+
+++ b/fs/9p/vfs_inode_dotl.c
32+
@@ -479,7 +479,7 @@ v9fs_vfs_getattr_dotl(struct vfsmount *mnt, struct dentry *dentry,
33+
34+
p9_debug(P9_DEBUG_VFS, "dentry: %p\n", dentry);
35+
v9ses = v9fs_dentry2v9ses(dentry);
36+
- if (v9ses->cache == CACHE_LOOSE || v9ses->cache == CACHE_FSCACHE) {
37+
+ if (!d_really_is_negative(dentry) || v9ses->cache == CACHE_LOOSE || v9ses->cache == CACHE_FSCACHE) {
38+
generic_fillattr(d_inode(dentry), stat);
39+
return 0;
40+
}
41+
--
42+
2.5.0
43+

build/kernel_version

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
# v4.4.7
2-
b40108b826ed9e1c558f73b9dbabb8d80ded268b
1+
# v4.4.7+
2+
084b4a5aa4b90975f7ac6b4714a6b449430ef4c4
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)