Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c959df9f01cfb2f43b4d1f58631ee1e9c50541b6
Commit:     c959df9f01cfb2f43b4d1f58631ee1e9c50541b6
Parent:     f51a5a9de86a948b9a30daab90fb003f51446dcd
Author:     Latchesar Ionkov <[EMAIL PROTECTED]>
AuthorDate: Mon Apr 23 14:41:11 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Tue Apr 24 08:23:08 2007 -0700

    v9fs: don't use primary fid when removing file
    
    v9fs_insert uses v9fs_fid_lookup (which also locks the fid) to get the
    primary fid associated with the dentry and destroys the v9fs_fid struct
    after removing the file.  If another process called v9fs_fid_lookup on the
    same dentry, it may wait undefinitely for the fid's lock (as the struct is
    freed).
    
    This patch changes v9fs_remove to use a cloned fid, so the primary fid is
    not locked and freed.
    
    Signed-off-by: Latchesar Ionkov <[EMAIL PROTECTED]>
    Cc: Eric Van Hensbergen <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 fs/9p/vfs_inode.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c
index 124a085..b01b0a4 100644
--- a/fs/9p/vfs_inode.c
+++ b/fs/9p/vfs_inode.c
@@ -415,7 +415,7 @@ static int v9fs_remove(struct inode *dir, struct dentry 
*file, int rmdir)
        file_inode = file->d_inode;
        sb = file_inode->i_sb;
        v9ses = v9fs_inode2v9ses(file_inode);
-       v9fid = v9fs_fid_lookup(file);
+       v9fid = v9fs_fid_clone(file);
        if(IS_ERR(v9fid))
                return PTR_ERR(v9fid);
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to