commit a773d4252763ce9a6e1b0ecdaf2821338b7f0611
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 d9872af..740a823 100644
--- a/fs/unionfs/dirhelper.c
+++ b/fs/unionfs/dirhelper.c
@@ -724,11 +724,13 @@ int odf_cache_dir(struct dentry *d_upper, struct dentry 
*d_odf, struct timespec
        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;
        
@@ -842,13 +844,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;
 }
 
_______________________________________________
unionfs-cvs mailing list: http://unionfs.filesystems.org/
[email protected]
http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs-cvs

Reply via email to