commit ac95701de91a14d985e4b314f879ab9f317a2b27
Author: Yiannis Pericleous <[EMAIL PROTECTED]>
Date: Tue Mar 13 13:06:42 2007 -0400
partial_lookup and mmap bugs
diff --git a/fs/unionfs/file.c b/fs/unionfs/file.c
index 84d6bab..baeddab 100644
--- a/fs/unionfs/file.c
+++ b/fs/unionfs/file.c
@@ -179,9 +179,9 @@ static int __do_mmap(struct file *file, struct
vm_area_struct *vma)
if (!hidden_file->f_op || !hidden_file->f_op->mmap)
goto out;
+ get_file(hidden_file); /* make sure it doesn't get freed on us */
vma->vm_file = hidden_file;
err = hidden_file->f_op->mmap(hidden_file, vma);
- get_file(hidden_file); /* make sure it doesn't get freed on us */
fput(file); /* no need to keep extra ref on ours */
out:
return err;
diff --git a/fs/unionfs/lookup.c b/fs/unionfs/lookup.c
index 4716e62..7b75bb9 100644
--- a/fs/unionfs/lookup.c
+++ b/fs/unionfs/lookup.c
@@ -307,8 +307,22 @@ int unionfs_partial_lookup(struct dentry *dentry)
struct nameidata nd = { .flags = 0 };
tmp = unionfs_lookup_backend(dentry, &nd, INTERPOSE_PARTIAL);
- if (!tmp)
+ if (!tmp) {
+ int err = 0;
+ if (UNIONFS_D(dentry) && !UNIONFS_D(dentry)->odf_info) {
+ tmp = unionfs_lower_dentry_idx(dentry, 0);
+ if (dentry->d_inode || (tmp && tmp->d_inode)) {
+ err = odf_lookup(dentry->d_parent, dentry, 0);
+ if (err)
+ return err;
+ BUG_ON(!UNIONFS_D(dentry)->odf_info);
+ if (UNIONFS_D(dentry)->odf_info->whiteout)
+ printk("%s is wh\n",
dentry->d_name.name);
+ }
+
+ }
return 0;
+ }
if (IS_ERR(tmp))
return PTR_ERR(tmp);
/* need to change the interface */
_______________________________________________
unionfs-cvs mailing list: http://unionfs.filesystems.org/
[email protected]
http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs-cvs