lkml.org 
[lkml]   [2012]   [Feb]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 49/73] union-mount: Call union lookup functions in lookup path [ver #2]
Date
From: Valerie Aurora <vaurora@redhat.com>

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

Original-author: Valerie Aurora <vaurora@redhat.com>
Signed-off-by: David Howells <dhowells@redhat.com>
---

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

diff --git a/fs/namei.c b/fs/namei.c
index c0adf4c..586913f 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -1587,6 +1587,14 @@ retry:
}
if (err)
nd->flags |= LOOKUP_JUMPED;
+
+ if (needs_lookup_union(&nd->path, path)) {
+ int err = lookup_union(nd, name, path);
+ if (err < 0)
+ return err;
+#warning which inode?
+ }
+
*inode = path->dentry->d_inode;
return 0;
}
@@ -2135,8 +2143,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_locked(nd, name, path);
return 0;
}



\
 
 \ /
  Last update: 2012-02-21 19:13    [W:0.245 / U:0.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site