1 --- linux-2.6.5-7.141/fs/namei.c.orig 2005-04-01 18:03:37.788262784 +0300
2 +++ linux-2.6.5-7.141/fs/namei.c 2005-04-01 18:05:43.058218856 +0300
6 if (inode->i_op->follow_link) {
7 + int save_flags = nd->flags;
9 nd->flags |= LOOKUP_LINK_NOTLAST;
10 err = do_follow_link(next.dentry, nd);
11 - nd->flags &= ~LOOKUP_LINK_NOTLAST;
12 + if (!(save_flags & LOOKUP_LINK_NOTLAST))
13 + nd->flags &= ~LOOKUP_LINK_NOTLAST;