GIT: unionfs2-2.6.27.y: Unionfs: bugfix when renaming symlinks on readonly branches
Erez Zadok
ezk at fsl.cs.sunysb.edu
Thu Aug 12 23:16:43 EDT 2010
commit 67952f7b05c76597acc269d8386804d6447e22a8
Author: Erez_Zadok <ezk at cs.sunysb.edu>
Date: Sat Jul 7 21:31:28 2007 -0400
Unionfs: bugfix when renaming symlinks on readonly branches
Signed-off-by: Erez Zadok <ezk at cs.sunysb.edu>
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);
More information about the unionfs-cvs
mailing list