projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
75abe32
)
vfs: namei: use path_equal() in follow_dotdot()
author
Danilo Krummrich
<danilokrummrich@dk-develop.de>
Mon, 23 Apr 2018 08:30:59 +0000
(10:30 +0200)
committer
Al Viro
<viro@zeniv.linux.org.uk>
Fri, 18 May 2018 02:19:39 +0000
(22:19 -0400)
Use path_equal() to detect whether we're already in root.
Signed-off-by: Danilo Krummrich <danilokrummrich@dk-develop.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/namei.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/namei.c
b/fs/namei.c
index 186bd2464fd5a842480a37c55b57d60d9164cf86..6f0dc40f88c5f443e54b18a82aa51c5681d2d316 100644
(file)
--- a/
fs/namei.c
+++ b/
fs/namei.c
@@
-1438,10
+1438,8
@@
static int path_parent_directory(struct path *path)
static int follow_dotdot(struct nameidata *nd)
{
while(1) {
- if (nd->path.dentry == nd->root.dentry &&
- nd->path.mnt == nd->root.mnt) {
+ if (path_equal(&nd->path, &nd->root))
break;
- }
if (nd->path.dentry != nd->path.mnt->mnt_root) {
int ret = path_parent_directory(&nd->path);
if (ret)