2.5.50: unused code in link_path_walk()

2.5.50: unused code in link_path_walk()

Post by Olaf Dietsch » Fri, 06 Dec 2002 01:20:11



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

                                if (this.name[1] != '.')
                                        break;
                                follow_dotdot(&nd->mnt, &nd->dentry);
-                               inode = nd->dentry->d_inode;
                                /* fallthrough */
                        case 1:
                                goto return_base;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

2.5.50: unused code in link_path_walk()

Post by Matthew Wilco » Sat, 07 Dec 2002 18:20:13



                                 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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

2.5.50: unused code in link_path_walk()

Post by Olaf Dietsch » Sat, 07 Dec 2002 19:00:16




>                                  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.

Quote:> 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.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

1. 2.5.50 responsiveness

Fetched Solaris 9 CDROM images yesterday, unpacked, copied, etc.
Manipulating these 600+ MB files totally kills the machine
(with 256 MB memory). Keystrokes are reacted to after half a minute.
It is impossible to use the mouse since the kernel is too slow
to accept mouse packets within its self-imposed timeout, so that
the logs are full of
psmouse.c: Lost synchronization, throwing 1 bytes away.
psmouse.c: Lost synchronization, throwing 3 bytes away.
psmouse.c: Lost synchronization, throwing 1 bytes away.
psmouse.c: Lost synchronization, throwing 3 bytes away.
The clock lost somewhat over 10 minutes.

This is really primitive behaviour.

Andries

[everything vanilla - no settings changed, no hdparm used]
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

2. Possible patch for C++ 4.2 compiler on Solaris 2.6?

3. [2.5.50][PnP]: Issue with SBAWE32 Gameport and Serial port & IDE controller conflict

4. Q. for using two CD-ROM drives

5. 2.5.50 - sound driver issues with i810_audio

6. MS Intellimouse wheel

7. 2.5.50 mpu401.h compilation error patches

8. Control Panel will not load

9. intermezzo fixes for 2.5.50

10. tms380tr / tmsisa 2.5.50 (corrected!)

11. Reiserfs broken in 2.5.50 (possibly nanosecond stat timefields?)

12. 2.5.50 keyboard won't work

13. oops while booting in 2.5.50