commit 415d09cd370d85242d8e0ce75c7edd9b54615db5
Author: Yiannis Pericleous <[EMAIL PROTECTED]>
Date: Wed Feb 7 14:38:33 2007 -0500
symlink, mknod to remove old whiteout
removed some old unlink code
new lookup flag to create dir as opaque
some locking
diff --git a/fs/unionfs/odf.c b/fs/unionfs/odf.c
index ec33a01..b1f07a0 100644
--- a/fs/unionfs/odf.c
+++ b/fs/unionfs/odf.c
@@ -1458,18 +1458,19 @@ int odf_get_opaque_i(struct inode *i)
*/
int odf_set_opaque(struct dentry *dentry, int branch)
{
- int err =
odf_set_opaque_i(UNIONFS_D(dentry)->odf_info->dentry->d_inode, branch);
+ struct odf_dentry_info *odi = UNIONFS_D(dentry)->odf_info;
+ int err = odf_set_opaque_i(odi->dentry->d_inode, branch);
if (!err)
- UNIONFS_D(dentry)->odf_info->opaque = branch;
+ odi->opaque = branch;
return err;
}
+
int odf_set_opaque_i(struct inode *i, int branch)
{
u32 b = branch;
int err = 0;
-
if (branch < 0)
- EXT2_I(i)->i_flags &= !ODF_OPAQUE;
+ EXT2_I(i)->i_flags &= ~ODF_OPAQUE;
else {
b <<= ODF_OPQ_BASE + 1;
b >>= 1;
@@ -1891,7 +1892,7 @@ struct odf_dentry_info *odf_fill_info(struct
odf_dentry_info *odi, struct odf_sb
*/
void odf_put_info(struct odf_dentry_info *odi)
{
- if (!(*odi))
+ if (!odi)
return;
dput(odi->dentry);
kfree(odi);
diff --git a/fs/unionfs/odf.h b/fs/unionfs/odf.h
index 12271af..7358627 100644
--- a/fs/unionfs/odf.h
+++ b/fs/unionfs/odf.h
@@ -146,4 +146,16 @@ static inline void odf_unlock(struct odf_dentry_info *odi)
extern void generate_random_uuid(unsigned char uuid_out[16]);
+/* Macros for locking an odf dentry info. */
+static inline void odf_lock(struct odf_dentry_info *odi)
+{
+ mutex_lock(&odi->lock);
+}
+
+static inline void odf_unlock(struct odf_dentry_info *odi)
+{
+ mutex_unlock(&odi->lock);
+}
+
+
#endif /* _ODF_H_ */
_______________________________________________
unionfs-cvs mailing list: http://unionfs.filesystems.org/
[email protected]
http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs-cvs