commit 5f9b76c65910299e45efabff1b9ee4e7b779f6a8
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Fri Dec 28 13:46:18 2007 -0500
Unionfs: handle on lower inodes in lookup
Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>
diff --git a/fs/unionfs/dentry.c b/fs/unionfs/dentry.c
index a2ee52c..3dd6120 100644
--- a/fs/unionfs/dentry.c
+++ b/fs/unionfs/dentry.c
@@ -144,8 +144,12 @@ static bool __unionfs_d_revalidate_one(struct dentry
*dentry,
valid = false;
}
- if (!dentry->d_inode)
+ if (!dentry->d_inode ||
+ ibstart(dentry->d_inode) < 0 ||
+ ibend(dentry->d_inode) < 0) {
valid = false;
+ goto out;
+ }
if (valid) {
/*
diff --git a/fs/unionfs/lookup.c b/fs/unionfs/lookup.c
index d13b17a..377f9d0 100644
--- a/fs/unionfs/lookup.c
+++ b/fs/unionfs/lookup.c
@@ -229,6 +229,7 @@ struct dentry *unionfs_lookup_backend(struct dentry *dentry,
/* FIXME: fix following line for mount point crossing */
nd->mnt = unionfs_lower_mnt_idx(parent_dentry, bindex);
+ BUG_ON(!lower_dir_dentry);
lower_dentry = lookup_one_len_nd(name, lower_dir_dentry,
namelen, nd);
if (IS_ERR(lower_dentry)) {
@@ -320,6 +321,10 @@ out_negative:
UNIONFS_I(dentry->d_inode)->stale = 1;
goto out;
}
+ if (!lower_dir_dentry) {
+ err = -ENOENT;
+ goto out;
+ }
/* This should only happen if we found a whiteout. */
if (first_dentry_offset == -1) {
nd->dentry = dentry;
_______________________________________________
unionfs-cvs mailing list: http://unionfs.filesystems.org/
[email protected]
http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs-cvs