* Re: [PATCH] 2.5.50: unused code in link_path_walk()
@ 2002-12-06 16:15 Matthew Wilcox
2002-12-06 16:52 ` Olaf Dietsche
0 siblings, 1 reply; 3+ messages in thread
From: Matthew Wilcox @ 2002-12-06 16:15 UTC (permalink / raw)
To: Olaf Dietsche; +Cc: linux-kernel, linux-fsdevel
@@ -700,7 +700,6 @@
if (this.name[1] != '.')
break;
follow_dotdot(&nd->mnt, &nd->dentry);
- inode = nd->dentry->d_inode;
/* fallthrough */
case 1:
goto return_base;
seems broken to me. if follow_dotdot() changes nd->dentry (can happen!),
inode needs to be changed. look:
inode = nd->dentry->d_inode;
for(;;) {
err = exec_permission_lite(inode);
if (this.name[0] == '.') switch (this.len) {
case 2:
if (this.name[1] != '.')
break;
follow_dotdot(&nd->mnt, &nd->dentry);
inode = nd->dentry->d_inode;
/* fallthrough */
case 1:
continue;
}
}
btw, you should cc linux-fsdevel for patches to the VFS.
--
"It's not Hollywood. War is real, war is primarily not about defeat or
victory, it is about death. I've seen thousands and thousands of dead bodies.
Do you think I want to have an academic debate on this subject?" -- Robert Fisk
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] 2.5.50: unused code in link_path_walk()
2002-12-06 16:15 [PATCH] 2.5.50: unused code in link_path_walk() Matthew Wilcox
@ 2002-12-06 16:52 ` Olaf Dietsche
0 siblings, 0 replies; 3+ messages in thread
From: Olaf Dietsche @ 2002-12-06 16:52 UTC (permalink / raw)
To: Matthew Wilcox; +Cc: linux-kernel, linux-fsdevel
Matthew Wilcox <willy@debian.org> writes:
> @@ -700,7 +700,6 @@
> if (this.name[1] != '.')
> break;
> follow_dotdot(&nd->mnt, &nd->dentry);
> - inode = nd->dentry->d_inode;
> /* fallthrough */
> case 1:
> goto return_base;
>
> seems broken to me. if follow_dotdot() changes nd->dentry (can happen!),
> inode needs to be changed. look:
>
> inode = nd->dentry->d_inode;
> for(;;) {
> err = exec_permission_lite(inode);
> if (this.name[0] == '.') switch (this.len) {
> case 2:
> if (this.name[1] != '.')
> break;
> follow_dotdot(&nd->mnt, &nd->dentry);
> inode = nd->dentry->d_inode;
> /* fallthrough */
> case 1:
> continue;
> }
> }
You looked at the _first_ switch statement. You must go further down
to the _second_ switch. *There*, you don't need this assignment, AFAICS.
> btw, you should cc linux-fsdevel for patches to the VFS.
Thanks for this pointer, I'll spam linux-fsdevel in the future ;-).
Regards, Olaf.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] 2.5.50: unused code in link_path_walk()
@ 2002-12-04 23:09 Olaf Dietsche
0 siblings, 0 replies; 3+ messages in thread
From: Olaf Dietsche @ 2002-12-04 23:09 UTC (permalink / raw)
To: linux-kernel
This patch removes one unnecessary line of code.
Regards, Olaf.
diff -urN a/fs/namei.c b/fs/namei.c
--- a/fs/namei.c Thu Nov 28 20:44:46 2002
+++ b/fs/namei.c Wed Dec 4 23:04:54 2002
@@ -700,7 +700,6 @@
if (this.name[1] != '.')
break;
follow_dotdot(&nd->mnt, &nd->dentry);
- inode = nd->dentry->d_inode;
/* fallthrough */
case 1:
goto return_base;
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-12-06 16:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-12-06 16:15 [PATCH] 2.5.50: unused code in link_path_walk() Matthew Wilcox
2002-12-06 16:52 ` Olaf Dietsche
-- strict thread matches above, loose matches on Subject: below --
2002-12-04 23:09 Olaf Dietsche
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox