]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
[PATCH] v9fs: fix races in fid allocation
authorLatchesar Ionkov <lucho@ionkov.net>
Wed, 28 Sep 2005 04:45:24 +0000 (21:45 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 28 Sep 2005 14:46:40 +0000 (07:46 -0700)
commit0b8dd17762194ec77066d339e0b2866b0c66b715
tree710bb489487c83fc03008228080d47f08662cc9f
parentdc7b5fd6b0d3beb41f9e5e3a94dd1eadf52209f3
[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>
fs/9p/fid.c
fs/9p/fid.h
fs/9p/vfs_dentry.c
fs/9p/vfs_dir.c
fs/9p/vfs_file.c
fs/9p/vfs_inode.c
fs/9p/vfs_super.c