commit d1f8f11ca752158f76669d0adcbf457aa17fbbb0
Author: Erez_Zadok <[EMAIL PROTECTED]>
Date:   Sat Jul 7 21:31:28 2007 -0400

    Unionfs: bugfix when renaming symlinks on readonly branches
    
    Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>

diff --git a/fs/unionfs/copyup.c b/fs/unionfs/copyup.c
index 64bb5ef..6ae2e56 100644
--- a/fs/unionfs/copyup.c
+++ b/fs/unionfs/copyup.c
@@ -385,7 +385,7 @@ int copyup_dentry(struct inode *dir, struct dentry *dentry, 
int bstart,
                        (char __user *)symbuf,
                        PATH_MAX);
                set_fs(oldfs);
-               if (err) {
+               if (err < 0) {
                        __clear(dentry, old_lower_dentry,
                                old_bstart, old_bend,
                                new_lower_dentry, new_bindex);
@@ -466,7 +466,8 @@ out_free:
         * functions we call above which operate on regular files.
         */
        if (old_lower_dentry && old_lower_dentry->d_inode &&
-           S_ISDIR(old_lower_dentry->d_inode->i_mode))
+           (S_ISDIR(old_lower_dentry->d_inode->i_mode) ||
+            S_ISLNK(old_lower_dentry->d_inode->i_mode)))
                dput(old_lower_dentry);
        kfree(symbuf);
 
_______________________________________________
unionfs-cvs mailing list: http://unionfs.filesystems.org/
[email protected]
http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs-cvs

Reply via email to