commit 4cee3dea261d746a7a0d57a7679e327745da3b70
Author: Yiannis Pericleous <[EMAIL PROTECTED]>
Date: Wed Apr 11 15:49:33 2007 -0400
concurency bug
diff --git a/fs/unionfs/dirhelper.c b/fs/unionfs/dirhelper.c
index d7c3402..129f157 100644
--- a/fs/unionfs/dirhelper.c
+++ b/fs/unionfs/dirhelper.c
@@ -305,13 +305,14 @@ int odf_cache_dir(struct dentry *d_upper, struct dentry
*d_odf, struct timespec
struct iattr attr;
sb = d_upper->d_sb;
-retry:
unionfs_read_lock(sb);
- odf_lock(UNIONFS_SB(sb)->odf->odi_ic);
- BUG_ON(!S_ISDIR(d_upper->d_inode->i_mode));
if ((err = unionfs_partial_lookup(d_upper)))
- goto out;
+ goto out_sb;
+
+retry:
+ odf_lock(UNIONFS_SB(sb)->odf->odi_ic);
+ BUG_ON(!S_ISDIR(d_upper->d_inode->i_mode));
i_odf = d_odf->d_inode;
@@ -425,13 +426,15 @@ out:
odf_file = NULL;
odf_unlock(UNIONFS_SB(sb)->odf->odi_ic);
- unionfs_read_unlock(sb);
if (err == -ENOSPC && !cleaned) {
cleaned = 1;
wake_up_and_wait_sioa(UNIONFS_SB(sb)->odf->cleanup);
goto retry;
}
+
+out_sb:
+ unionfs_read_unlock(sb);
return err;
}
diff --git a/fs/unionfs/odf.h b/fs/unionfs/odf.h
index 03ebbee..086ec4b 100644
--- a/fs/unionfs/odf.h
+++ b/fs/unionfs/odf.h
@@ -120,7 +120,6 @@ 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_get_opaque(struct inode *i);
int __odf_set_opaque(struct inode *i, int branch);
#define __odf_get_opaque(i) (i->i_gid -1)
_______________________________________________
unionfs-cvs mailing list: http://unionfs.filesystems.org/
[email protected]
http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs-cvs