commit 6f5485c29cc055a2cce634e5eb89f8605d4310ea
Author: Erez_Zadok <[EMAIL PROTECTED]>
Date:   Fri Nov 16 13:47:03 2007 -0500

    Unionfs: bugfix: don't call branchget() until dentry_open succeeded
    
    If dentry_open fails, we incorrectly have incremented our branch counts
    which would prevent unionfs from being unmounted (EBUSY).
    
    Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>

diff --git a/fs/unionfs/commonfops.c b/fs/unionfs/commonfops.c
index 247c89b..4a5abf3 100644
--- a/fs/unionfs/commonfops.c
+++ b/fs/unionfs/commonfops.c
@@ -283,7 +283,6 @@ static int open_highest_file(struct file *file, int 
willwrite)
 
        dget(lower_dentry);
        unionfs_mntget(dentry, bstart);
-       branchget(sb, bstart);
        lower_file = dentry_open(lower_dentry,
                                 unionfs_lower_mnt_idx(dentry, bstart),
                                 file->f_flags);
@@ -291,6 +290,7 @@ static int open_highest_file(struct file *file, int 
willwrite)
                err = PTR_ERR(lower_file);
                goto out;
        }
+       branchget(sb, bstart);
        unionfs_set_lower_file(file, lower_file);
        /* Fix up the position. */
        lower_file->f_pos = file->f_pos;
_______________________________________________
unionfs-cvs mailing list: http://unionfs.filesystems.org/
[email protected]
http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs-cvs

Reply via email to