Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 231513
b: refs/heads/master
c: db37291
h: refs/heads/master
i:
  231511: 75ee47b
v: v3
  • Loading branch information
David Howells authored and Al Viro committed Jan 16, 2011
1 parent c098bb5 commit bae4879
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 01c64feac45cea1317263eabc4f7ee1b240f297f
refs/heads/master: db3729153e82ba3ada89681f26c4f1b6d6807a80
17 changes: 3 additions & 14 deletions trunk/fs/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -1341,17 +1341,6 @@ static int do_lookup(struct nameidata *nd, struct qstr *name,
return PTR_ERR(dentry);
}

/*
* This is a temporary kludge to deal with "automount" symlinks; proper
* solution is to trigger them on follow_mount(), so that do_lookup()
* would DTRT. To be killed before 2.6.34-final.
*/
static inline int follow_on_final(struct inode *inode, unsigned lookup_flags)
{
return inode && unlikely(inode->i_op->follow_link) &&
((lookup_flags & LOOKUP_FOLLOW) || S_ISDIR(inode->i_mode));
}

/*
* Name resolution.
* This is the basic name resolution function, turning a pathname into
Expand Down Expand Up @@ -1490,7 +1479,8 @@ static int link_path_walk(const char *name, struct nameidata *nd)
err = do_lookup(nd, &this, &next, &inode);
if (err)
break;
if (follow_on_final(inode, lookup_flags)) {
if (inode && unlikely(inode->i_op->follow_link) &&
(lookup_flags & LOOKUP_FOLLOW)) {
if (nameidata_dentry_drop_rcu_maybe(nd, next.dentry))
return -ECHILD;
BUG_ON(inode != next.dentry->d_inode);
Expand Down Expand Up @@ -2543,8 +2533,7 @@ struct file *do_filp_open(int dfd, const char *pathname,
struct inode *linki = link.dentry->d_inode;
void *cookie;
error = -ELOOP;
/* S_ISDIR part is a temporary automount kludge */
if (!(nd.flags & LOOKUP_FOLLOW) && !S_ISDIR(linki->i_mode))
if (!(nd.flags & LOOKUP_FOLLOW))
goto exit_dput;
if (count++ == 32)
goto exit_dput;
Expand Down

0 comments on commit bae4879

Please sign in to comment.