diff options
author | David Howells <dhowells@redhat.com> | 2011-01-14 13:45:53 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2011-01-15 20:07:36 -0500 |
commit | db3729153e82ba3ada89681f26c4f1b6d6807a80 (patch) | |
tree | 55714bb93d9377e5f8762b9030e87fec3e469645 /fs/namei.c | |
parent | 01c64feac45cea1317263eabc4f7ee1b240f297f (diff) |
Remove the automount through follow_link() kludge code from pathwalk
Remove the automount through follow_link() kludge code from pathwalk in favour
of using d_automount().
Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Ian Kent <raven@themaw.net>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/namei.c')
-rw-r--r-- | fs/namei.c | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/fs/namei.c b/fs/namei.c index dc50bfb2f5d6..61995fba4e21 100644 --- a/fs/namei.c +++ b/fs/namei.c | |||
@@ -1342,17 +1342,6 @@ fail: | |||
1342 | } | 1342 | } |
1343 | 1343 | ||
1344 | /* | 1344 | /* |
1345 | * This is a temporary kludge to deal with "automount" symlinks; proper | ||
1346 | * solution is to trigger them on follow_mount(), so that do_lookup() | ||
1347 | * would DTRT. To be killed before 2.6.34-final. | ||
1348 | */ | ||
1349 | static inline int follow_on_final(struct inode *inode, unsigned lookup_flags) | ||
1350 | { | ||
1351 | return inode && unlikely(inode->i_op->follow_link) && | ||
1352 | ((lookup_flags & LOOKUP_FOLLOW) || S_ISDIR(inode->i_mode)); | ||
1353 | } | ||
1354 | |||
1355 | /* | ||
1356 | * Name resolution. | 1345 | * Name resolution. |
1357 | * This is the basic name resolution function, turning a pathname into | 1346 | * This is the basic name resolution function, turning a pathname into |
1358 | * the final dentry. We expect 'base' to be positive and a directory. | 1347 | * the final dentry. We expect 'base' to be positive and a directory. |
@@ -1490,7 +1479,8 @@ last_component: | |||
1490 | err = do_lookup(nd, &this, &next, &inode); | 1479 | err = do_lookup(nd, &this, &next, &inode); |
1491 | if (err) | 1480 | if (err) |
1492 | break; | 1481 | break; |
1493 | if (follow_on_final(inode, lookup_flags)) { | 1482 | if (inode && unlikely(inode->i_op->follow_link) && |
1483 | (lookup_flags & LOOKUP_FOLLOW)) { | ||
1494 | if (nameidata_dentry_drop_rcu_maybe(nd, next.dentry)) | 1484 | if (nameidata_dentry_drop_rcu_maybe(nd, next.dentry)) |
1495 | return -ECHILD; | 1485 | return -ECHILD; |
1496 | BUG_ON(inode != next.dentry->d_inode); | 1486 | BUG_ON(inode != next.dentry->d_inode); |
@@ -2543,8 +2533,7 @@ reval: | |||
2543 | struct inode *linki = link.dentry->d_inode; | 2533 | struct inode *linki = link.dentry->d_inode; |
2544 | void *cookie; | 2534 | void *cookie; |
2545 | error = -ELOOP; | 2535 | error = -ELOOP; |
2546 | /* S_ISDIR part is a temporary automount kludge */ | 2536 | if (!(nd.flags & LOOKUP_FOLLOW)) |
2547 | if (!(nd.flags & LOOKUP_FOLLOW) && !S_ISDIR(linki->i_mode)) | ||
2548 | goto exit_dput; | 2537 | goto exit_dput; |
2549 | if (count++ == 32) | 2538 | if (count++ == 32) |
2550 | goto exit_dput; | 2539 | goto exit_dput; |