Messages in this thread Patch in this message | | | Date | Sat, 19 Jul 1997 11:00:32 -0400 | From | Bill Hawes <> | Subject | patch for 2.1.46-1 dangling symlink oops |
| |
I got bit by the dangling symlink problem reported recently ... attached is a patch to fix it.
Regards, Bill--- fs/namei.c.old Sat Jul 19 08:45:16 1997 +++ fs/namei.c Sat Jul 19 10:38:07 1997 @@ -388,12 +388,10 @@ struct qstr this; char c, follow; - dentry = base; - if (IS_ERR(base)) - break; - dentry = ERR_PTR(-ENOENT); - if (!base->d_inode) + if (!base->d_inode) { + dentry = ERR_PTR(-ENOENT); break; + } this.name = name; hash = init_name_hash(); len = 0; @@ -424,7 +422,7 @@ break; base = do_follow_link(base, dentry); - if (c) + if (!IS_ERR(base) && c) continue; return base; | |