aboutsummaryrefslogtreecommitdiffstats
path: root/fs/9p/vfs_dentry.c
diff options
context:
space:
mode:
authorLatchesar Ionkov <lucho@ionkov.net>2005-09-28 00:45:24 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-28 10:46:40 -0400
commit0b8dd17762194ec77066d339e0b2866b0c66b715 (patch)
tree710bb489487c83fc03008228080d47f08662cc9f /fs/9p/vfs_dentry.c
parentdc7b5fd6b0d3beb41f9e5e3a94dd1eadf52209f3 (diff)
[PATCH] v9fs: fix races in fid allocation
Fid management cleanup. The patch attempts to fix the races in dentry's fid management. Dentries don't keep the opened fids anymore, they are moved to the file structs. Ideally there should be no more than one fid with fidcreate equal to zero in the dentry's list of fids. v9fs_fid_create initializes the important fields (fid, fidcreated) before v9fs_fid is added to the list. v9fs_fid_lookup returns only fids that are not created by v9fs_create. v9fs_fid_get_created returns the fid created by the same process by v9fs_create (if any) and removes it from dentry's list Signed-off-by: Latchesar Ionkov <lucho@ionkov.net> Cc: Eric Van Hensbergen <ericvh@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/9p/vfs_dentry.c')
-rw-r--r--fs/9p/vfs_dentry.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/9p/vfs_dentry.c b/fs/9p/vfs_dentry.c
index 306c96741f81..a6aa947de0f9 100644
--- a/fs/9p/vfs_dentry.c
+++ b/fs/9p/vfs_dentry.c
@@ -67,7 +67,7 @@ static int v9fs_dentry_validate(struct dentry *dentry, struct nameidata *nd)
67 struct dentry *dc = current->fs->pwd; 67 struct dentry *dc = current->fs->pwd;
68 68
69 dprintk(DEBUG_VFS, "dentry: %s (%p)\n", dentry->d_iname, dentry); 69 dprintk(DEBUG_VFS, "dentry: %s (%p)\n", dentry->d_iname, dentry);
70 if (v9fs_fid_lookup(dentry, FID_OP)) { 70 if (v9fs_fid_lookup(dentry)) {
71 dprintk(DEBUG_VFS, "VALID\n"); 71 dprintk(DEBUG_VFS, "VALID\n");
72 return 1; 72 return 1;
73 } 73 }