lkml.org 
[lkml]   [1997]   [Jul]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subjectpatch 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;
\
 
 \ /
  Last update: 2005-03-22 13:39    [W:0.059 / U:0.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site