commit 468afca1fce9d6937cadf5fc30e76290c79ceb96
Author: Yiannis Pericleous <[EMAIL PROTECTED]>
Date:   Thu Apr 12 16:41:06 2007 -0400

    use notify_change instead of inode_setattr for setting opaqueness

diff --git a/fs/unionfs/odf.c b/fs/unionfs/odf.c
index 
76649352a23bdd782d3561e18c1774b37d3ffa7f..57030067d4b422ca4e8d91538773f1f00e6013ce
 100644
--- a/fs/unionfs/odf.c
+++ b/fs/unionfs/odf.c
@@ -1044,7 +1044,7 @@ retry:
 
                /* set opaqueness to 0 or -1 */
                opaque = (flags & ODF_LOOKUP_OPQ) ? osi->opaque_branch_id : -1;
-               __odf_set_opaque(odf_dentry->d_inode, opaque);
+               __odf_set_opaque(odf_dentry, opaque);
        }
        else {
                /* hardlinks, check if link inode is same as odf_dentry inode,
@@ -1401,18 +1401,18 @@ int odf_get_opaque(struct super_block *s
 int odf_set_opaque(struct dentry *dentry, int branch)
 {
        struct odf_dentry_info *odi = UNIONFS_D(dentry)->odf_info;
-       int err = __odf_set_opaque(odi->dentry->d_inode, branch);
+       int err = __odf_set_opaque(odi->dentry, branch);
        if (!err)
                odi->opaque = branch;
        return err;
 }
 
-int __odf_set_opaque(struct inode *i, int branch) 
+int __odf_set_opaque(struct dentry *d, int branch) 
 {
        struct iattr ia;
        ia.ia_valid = ATTR_GID;
        ia.ia_gid = branch + 1;  /* since gid is unsigned */
-       return inode_setattr(i, &ia);
+       return notify_change(d, &ia);
 }
 
 /* 
diff --git a/fs/unionfs/odf.h b/fs/unionfs/odf.h
index 
aadda019283e524d109481e109ba122d17045ce2..6dbddea0a28b1643c9883100e4eaf1803491a01c
 100644
--- a/fs/unionfs/odf.h
+++ b/fs/unionfs/odf.h
@@ -116,7 +116,7 @@ int odf_is_opaque(struct dentry *dentry)
 int odf_get_opaque(struct super_block *sb, struct dentry *dentry);
 int odf_set_opaque(struct dentry *dentry, int branch);
 int __odf_is_opaque(struct inode *i);
-int __odf_set_opaque(struct inode *i, int branch);
+int __odf_set_opaque(struct dentry *d, int branch);
 #define __odf_get_opaque(i) (i->i_gid -1)
 
 /* cleanup thread functions */
_______________________________________________
unionfs-cvs mailing list: http://unionfs.filesystems.org/
[EMAIL PROTECTED]
http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs-cvs

Reply via email to