commit e11449e5adc62b5dd9af28afd30d786a9574f647
Author: Yiannis Pericleous <[EMAIL PROTECTED]>
Date:   Fri Feb 9 17:58:59 2007 -0500

    Fixed some concurrency issues
    
    before i would alloc a new odf_info on each odf_lookup,
    now I reuse the same for each unionfs dentry.
    But still my locking needs to be fixed

diff --git a/fs/unionfs/odf.c b/fs/unionfs/odf.c
index c0e4c01..c64995e 100644
--- a/fs/unionfs/odf.c
+++ b/fs/unionfs/odf.c
@@ -835,20 +835,14 @@ int odf_rename(struct dentry *old_dentry, struct dentry 
*new_dentry)
        struct dentry *old_dir, *new_dir;
        struct dentry *old_odfdentry, *new_odfdentry;
        int err = 0;
-
-       UNIONFS_D(old_dentry)->odf_info = odf_lookup(
-                               old_dentry->d_parent,
-                               old_dentry,
-                               0);
-       UNIONFS_D(new_dentry)->odf_info = odf_lookup(
-                               new_dentry->d_parent,
-                               new_dentry,
-                               0);
+       
+       err = odf_lookup(old_dentry->d_parent, old_dentry, 0);
+       err = odf_lookup(new_dentry->d_parent, new_dentry, 0);
 
        /* if new exists, remove it */
        if (UNIONFS_D(new_dentry)->odf_info)
                err = odf_remove(new_dentry, ODF_RMV_ANY);
-               
+
        old_odfdentry = UNIONFS_D(old_dentry)->odf_info->dentry;
        old_dir = old_odfdentry->d_parent;
        new_dir = (UNIONFS_D(new_dentry->d_parent))->odf_info->dentry;
@@ -1405,6 +1399,9 @@ int odf_remove(struct dentry *dentry, int flags)
                err = odf_reclaim(dentry);
        else 
                err = vfs_unlink(odi->dentry->d_parent->d_inode, odi->dentry);
+               if (!err)
+;//                    odi->dentry = NULL; /*so we dont dput*/ 
+       }
        if (err)
                goto out_unlock;
 
@@ -1470,9 +1467,9 @@ int __odf_set_opaque(struct dentry *d, int branch)
  */
 int odf_is_opaque(struct dentry *dentry) 
 {
-       return odf_is_opaque_i(UNIONFS_D(dentry)->odf_info->dentry->d_inode);
+       return __odf_is_opaque(UNIONFS_D(dentry)->odf_info->dentry->d_inode);
 }
-int odf_is_opaque_i(struct inode *i) 
+int __odf_is_opaque(struct inode *i) 
 {
        if (!S_ISDIR(i->i_mode))
                return 0;
@@ -1486,12 +1483,12 @@ int odf_is_opaque_i(struct inode *i)
  */
 int odf_get_opaque(struct dentry *dentry) 
 {
-       return odf_get_opaque_i(UNIONFS_D(dentry)->odf_info->dentry->d_inode);
+       return __odf_get_opaque(UNIONFS_D(dentry)->odf_info->dentry->d_inode);
 }
-int odf_get_opaque_i(struct inode *i) 
+int __odf_get_opaque(struct inode *i) 
 {
        u32 res = 0;
-       if (!odf_is_opaque_i(i))
+       if (!__odf_is_opaque(i))
                return -1;
 
        /* get bits 26-30 */
@@ -1508,13 +1505,13 @@ int odf_get_opaque_i(struct inode *i)
 int odf_set_opaque(struct dentry *dentry, int branch)
 {
        struct odf_dentry_info *odi = UNIONFS_D(dentry)->odf_info;
-       int err = odf_set_opaque_i(odi->dentry->d_inode, branch);
+       int err = __odf_set_opaque(odi->dentry->d_inode, branch);
        if (!err)
                odi->opaque = branch;
        return err;
 }
 
-int odf_set_opaque_i(struct inode *i, int branch) 
+int __odf_set_opaque(struct inode *i, int branch) 
 {
        u32 b = branch;
        int err = 0;
_______________________________________________
unionfs-cvs mailing list: http://unionfs.filesystems.org/
[email protected]
http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs-cvs

Reply via email to