commit 9d1e267fe9bd207075f897771fdef8f09cadb637
Author: Yiannis Pericleous <[EMAIL PROTECTED]>
Date: Tue May 29 21:01:32 2007 -0400
removed duplicate odf_get_opaque and odf_set_opaque functions
diff --git a/fs/unionfs/odf.c b/fs/unionfs/odf.c
index bfda834..8594aa1 100644
--- a/fs/unionfs/odf.c
+++ b/fs/unionfs/odf.c
@@ -1153,7 +1153,7 @@ retry:
/* set opaqueness to 0 or -1 */
opaque = (flags & ODF_LOOKUP_OPQ)?branch_id(parent->d_sb, 0):-1;
- __odf_set_opaque(odf_dentry, opaque);
+ odf_set_opaque(odf_dentry, opaque);
}
else {
/* hardlinks, check if link inode is same as odf_dentry inode,
@@ -1167,7 +1167,7 @@ retry:
UNIONFS_D(target)->odf.whiteout =
__odf_is_wh(osi, odf_dentry);
UNIONFS_D(target)->odf.opaque =
- __odf_get_opaque(odf_dentry->d_inode);
+ odf_dentry->d_inode->i_gid - 1;
}
if (__odf_is_wh(osi, odf_dentry)) {
@@ -1561,30 +1561,20 @@ int odf_get_opaque(struct super_block *sb, struct
dentry *dentry)
* can no longer be considered opaque
*/
if (i == -1)
- odf_set_opaque(dentry, -1);
+ odf_set_opaque(UNIONFS_D(dentry)->odf.dentry, -1);
return i;
}
/*
- * Sets a dentry as opaque. The branch must be the branch_id as stored in
unionfs sb.
- * If the dentry is not to be opaque, then branch must be -1
- * The dentry version takes a unionfs dentry, the inode one an ODF inode
+ * Sets a dentry as opaque. The branch must be the branch_id
+ * as stored in unionfs sb.
*/
-int odf_set_opaque(struct dentry *dentry, int branch)
-{
- struct dentry *odf_dentry = UNIONFS_D(dentry)->odf.dentry;
- int err = __odf_set_opaque(odf_dentry, branch);
- if (!err)
- UNIONFS_D(dentry)->odf.opaque = branch;
- return err;
-}
-
-int __odf_set_opaque(struct dentry *d, int branch)
+int odf_set_opaque(struct dentry *odf_dentry, int branch)
{
struct iattr ia;
ia.ia_valid = ATTR_GID;
ia.ia_gid = branch + 1; /* since gid is unsigned */
- return notify_change(d, &ia);
+ return notify_change(odf_dentry, &ia);
}
/*
diff --git a/fs/unionfs/odf.h b/fs/unionfs/odf.h
index cca6c48..ba36c7b 100644
--- a/fs/unionfs/odf.h
+++ b/fs/unionfs/odf.h
@@ -91,9 +91,7 @@ static inline int __odf_is_wh(struct odf_sb_info *osi, struct
dentry *dentry)
/* opaque */
int odf_get_opaque(struct super_block *sb, struct dentry *dentry);
-int odf_set_opaque(struct dentry *dentry, int branch);
-int __odf_set_opaque(struct dentry *d, int branch);
-#define __odf_get_opaque(i) (i->i_gid -1)
+int odf_set_opaque(struct dentry *odf_dentry, int branch);
/* cleanup thread functions */
extern void __odf_cleanup(void *args);
_______________________________________________
unionfs-cvs mailing list: http://unionfs.filesystems.org/
[email protected]
http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs-cvs