aboutsummaryrefslogtreecommitdiffstats
path: root/fs/9p/vfs_inode.c
diff options
context:
space:
mode:
authorLatchesar Ionkov <lucho@ionkov.net>2006-03-22 03:07:37 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-22 10:53:55 -0500
commit5e7a99ac452d7a4ce43b8bacb3495475e1f9fd71 (patch)
treeded83e560e5f21540e5e23c3b9cb4ed9e8376f94 /fs/9p/vfs_inode.c
parent8a2cda007068e838ac6494cde74c37534f04f8dc (diff)
[PATCH] v9fs: assign dentry ops to negative dentries
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> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/9p/vfs_inode.c')
-rw-r--r--fs/9p/vfs_inode.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c
index 3ad8455f8577..651a9e14d9a9 100644
--- a/fs/9p/vfs_inode.c
+++ b/fs/9p/vfs_inode.c
@@ -614,6 +614,7 @@ static struct dentry *v9fs_vfs_lookup(struct inode *dir, struct dentry *dentry,
614 614
615 sb = dir->i_sb; 615 sb = dir->i_sb;
616 v9ses = v9fs_inode2v9ses(dir); 616 v9ses = v9fs_inode2v9ses(dir);
617 dentry->d_op = &v9fs_dentry_operations;
617 dirfid = v9fs_fid_lookup(dentry->d_parent); 618 dirfid = v9fs_fid_lookup(dentry->d_parent);
618 619
619 if (!dirfid) { 620 if (!dirfid) {
@@ -681,8 +682,6 @@ static struct dentry *v9fs_vfs_lookup(struct inode *dir, struct dentry *dentry,
681 goto FreeFcall; 682 goto FreeFcall;
682 683
683 fid->qid = fcall->params.rstat.stat.qid; 684 fid->qid = fcall->params.rstat.stat.qid;
684
685 dentry->d_op = &v9fs_dentry_operations;
686 v9fs_stat2inode(&fcall->params.rstat.stat, inode, inode->i_sb); 685 v9fs_stat2inode(&fcall->params.rstat.stat, inode, inode->i_sb);
687 686
688 d_add(dentry, inode); 687 d_add(dentry, inode);