From: Eric Van Hensbergen <ericvh@hera.kernel.org>
To: akpm@osdl.org
Cc: linux-kernel@vger.kernel.org,
v9fs-developer@lists.sourceforge.net, ericvh@gmail.com
Subject: [PATCH] v9fs: assign dentry ops to negative dentries
Date: Fri, 17 Mar 2006 19:10:27 GMT [thread overview]
Message-ID: <200603171910.k2HJARgO006427@hera.kernel.org> (raw)
Subject: [PATCH] assign dentry ops to negative dentries
From: Latchesar Ionkov <lucho@ionkov.net>
Date: 1142219619 -0500
If a file is not found in v9fs_vfs_lookup, the function creates negative
dentry, but doesn't assign any dentry ops. This leaves the negative entry
in the cache (there is no d_delete to mark it for removal). If the file is
created outside of the mounted v9fs filesystem, the file shows up in the
directory with weird permissions.
This patch assigns the default v9fs dentry ops to the negative dentry.
Signed-off-by: Latchesar Ionkov <lucho@ionkov.net>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
---
fs/9p/vfs_inode.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
1c2ced3fa5281cc5f96272186c8f180b8e2823c8
diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c
index 3438e6a..d3c4cd4 100644
--- a/fs/9p/vfs_inode.c
+++ b/fs/9p/vfs_inode.c
@@ -614,6 +614,7 @@ static struct dentry *v9fs_vfs_lookup(st
sb = dir->i_sb;
v9ses = v9fs_inode2v9ses(dir);
+ dentry->d_op = &v9fs_dentry_operations;
dirfid = v9fs_fid_lookup(dentry->d_parent);
if (!dirfid) {
@@ -681,8 +682,6 @@ static struct dentry *v9fs_vfs_lookup(st
goto FreeFcall;
fid->qid = fcall->params.rstat.stat.qid;
-
- dentry->d_op = &v9fs_dentry_operations;
v9fs_stat2inode(&fcall->params.rstat.stat, inode, inode->i_sb);
d_add(dentry, inode);
--
1.1.0
reply other threads:[~2006-03-17 19:10 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200603171910.k2HJARgO006427@hera.kernel.org \
--to=ericvh@hera.kernel.org \
--cc=akpm@osdl.org \
--cc=ericvh@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=v9fs-developer@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox