commit 4242fda3b5e90ad34b5976fd9f1d2a2bdfabf1cf
Author: Erez_Zadok <[EMAIL PROTECTED]>
Date: Fri Nov 16 13:47:15 2007 -0500
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 3a1836d..c9c0a64 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);
@@ -472,7 +472,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