[PATCH 50/76] union-mount: Call union lookup functions in lookup path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Valerie Aurora <vaurora@xxxxxxxxxx>

Union mounts hook into the lookup path in two places: do_lookup() and
lookup_hash().
---

 fs/namei.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/fs/namei.c b/fs/namei.c
index efd1937..4a01441 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -1548,6 +1548,14 @@ retry:
 		path_put_conditional(path, nd);
 		return err;
 	}
+
+	if (needs_lookup_union(&nd->path, path)) {
+		int err = do_lookup_union(nd, name, path);
+		if (err < 0)
+			return err;
+#warning which inode?
+	}
+
 	*inode = path->dentry->d_inode;
 	return 0;
 }
@@ -2029,8 +2037,12 @@ static int lookup_hash(struct nameidata *nd, struct qstr *name,
 		path->dentry = NULL;
 		return PTR_ERR(result);
 	}
+
 	path->mnt = nd->path.mnt;
 	path->dentry = result;
+
+	if (needs_lookup_union(&nd->path, path))
+		return lookup_union(nd, name, path);
 	return 0;
 }
 

--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux