This repository has been archived by the owner on May 6, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #110 from devimc/hack9p
kernel: fix 9p fs unlink-ftruncate
- Loading branch information
Showing
3 changed files
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
kernel/patches-4.9.x/0209-HACK-9P-always-use-cached-inode-to-fill-in-v9fs_vfs_.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
From cb9d8ef839855dedb4cb9c167510b171a00b098d Mon Sep 17 00:00:00 2001 | ||
From: Julio Montes <[email protected]> | ||
Date: Mon, 18 Sep 2017 11:46:59 -0500 | ||
Subject: [PATCH] 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]> | ||
--- | ||
fs/9p/vfs_inode.c | 2 +- | ||
fs/9p/vfs_inode_dotl.c | 2 +- | ||
2 files changed, 2 insertions(+), 2 deletions(-) | ||
|
||
diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c | ||
index c00487e..0fc1cd4 100644 | ||
--- a/fs/9p/vfs_inode.c | ||
+++ b/fs/9p/vfs_inode.c | ||
@@ -1067,7 +1067,7 @@ v9fs_vfs_getattr(struct vfsmount *mnt, struct dentry *dentry, | ||
|
||
p9_debug(P9_DEBUG_VFS, "dentry: %p\n", dentry); | ||
v9ses = v9fs_dentry2v9ses(dentry); | ||
- if (v9ses->cache == CACHE_LOOSE || v9ses->cache == CACHE_FSCACHE) { | ||
+ if (!d_really_is_negative(dentry) || v9ses->cache == CACHE_LOOSE || v9ses->cache == CACHE_FSCACHE) { | ||
generic_fillattr(d_inode(dentry), stat); | ||
return 0; | ||
} | ||
diff --git a/fs/9p/vfs_inode_dotl.c b/fs/9p/vfs_inode_dotl.c | ||
index afaa4b6..0c6fb9c 100644 | ||
--- a/fs/9p/vfs_inode_dotl.c | ||
+++ b/fs/9p/vfs_inode_dotl.c | ||
@@ -477,7 +477,7 @@ v9fs_vfs_getattr_dotl(struct vfsmount *mnt, struct dentry *dentry, | ||
|
||
p9_debug(P9_DEBUG_VFS, "dentry: %p\n", dentry); | ||
v9ses = v9fs_dentry2v9ses(dentry); | ||
- if (v9ses->cache == CACHE_LOOSE || v9ses->cache == CACHE_FSCACHE) { | ||
+ if (!d_really_is_negative(dentry) || v9ses->cache == CACHE_LOOSE || v9ses->cache == CACHE_FSCACHE) { | ||
generic_fillattr(d_inode(dentry), stat); | ||
return 0; | ||
} | ||
-- | ||
2.7.5 | ||
|