commit 5c3a1c16a6f3bc49a5962b977ad8b0af84cef01d
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Fri Dec 28 13:46:24 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 82e85b2..8bbe159 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 fce2a3b..b9b8b06 100644
--- a/fs/unionfs/lookup.c
+++ b/fs/unionfs/lookup.c
@@ -230,6 +230,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((char *) name,
lower_dir_dentry,
namelen, nd);
if (IS_ERR(lower_dentry)) {
@@ -321,6 +322,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) {
if (nd) {
_______________________________________________
unionfs-cvs mailing list: http://unionfs.filesystems.org/
[email protected]
http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs-cvs