commit e31b132bf88f41d68101943aae15f4a838e21c6c
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