From 1ec104bdd9ed78dd809194097836dfdf541a082b Mon Sep 17 00:00:00 2001 From: Al Viro Date: Mon, 6 Jun 2005 13:36:04 -0700 Subject: [PATCH] --- yaml --- r: 1847 b: refs/heads/master c: d671d5e51400aab03c713a16ce3545aa81ad7b1c h: refs/heads/master i: 1845: 2802f703306fe69b862398253ea6ec53c06df113 1843: c7a750d95f87a0f07b98cf154a2bff87baa18652 1839: 4655176f3af5f8a4a5db49d384940a86605912d4 v: v3 --- [refs] | 2 +- trunk/fs/namei.c | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 3f11f789b5d2..bf0bcf5150c7 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: cd4e91d3bca8d5527289f5984cf32e9fe6fb8293 +refs/heads/master: d671d5e51400aab03c713a16ce3545aa81ad7b1c diff --git a/trunk/fs/namei.c b/trunk/fs/namei.c index 18ea0606145e..3d08478d3130 100644 --- a/trunk/fs/namei.c +++ b/trunk/fs/namei.c @@ -1526,14 +1526,11 @@ int open_namei(const char * pathname, int flag, int mode, struct nameidata *nd) if (error) goto exit_dput; error = __do_follow_link(&path, nd); - path.mnt = nd->mnt; if (error) return error; nd->flags &= ~LOOKUP_PARENT; - if (nd->last_type == LAST_BIND) { - path.dentry = nd->dentry; + if (nd->last_type == LAST_BIND) goto ok; - } error = -EISDIR; if (nd->last_type != LAST_NORM) goto exit; @@ -1549,6 +1546,7 @@ int open_namei(const char * pathname, int flag, int mode, struct nameidata *nd) dir = nd->dentry; down(&dir->d_inode->i_sem); path.dentry = __lookup_hash(&nd->last, nd->dentry, nd); + path.mnt = nd->mnt; putname(nd->last.name); goto do_last; }