Loading fs/namei.c +12 −2 Original line number Diff line number Diff line Loading @@ -822,6 +822,17 @@ 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 Loading Loading @@ -942,8 +953,7 @@ static int link_path_walk(const char *name, struct nameidata *nd) if (err) break; inode = next.dentry->d_inode; if ((lookup_flags & LOOKUP_FOLLOW) && inode && inode->i_op->follow_link) { if (follow_on_final(inode, lookup_flags)) { err = do_follow_link(&next, nd); if (err) goto return_err; Loading Loading
fs/namei.c +12 −2 Original line number Diff line number Diff line Loading @@ -822,6 +822,17 @@ 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 Loading Loading @@ -942,8 +953,7 @@ static int link_path_walk(const char *name, struct nameidata *nd) if (err) break; inode = next.dentry->d_inode; if ((lookup_flags & LOOKUP_FOLLOW) && inode && inode->i_op->follow_link) { if (follow_on_final(inode, lookup_flags)) { err = do_follow_link(&next, nd); if (err) goto return_err; Loading