From: Greg Kroah-Hartman Date: Fri, 5 Mar 2010 01:31:25 +0000 (-0800) Subject: start .32 queue X-Git-Tag: v2.6.32.10~36 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c1d9ee77770cf610ab2e9f2d4c4f6c0bc39b9037;p=thirdparty%2Fkernel%2Fstable-queue.git start .32 queue --- diff --git a/queue-2.6.32/fix-lookup_follow-on-automount-symlinks.patch b/queue-2.6.32/fix-lookup_follow-on-automount-symlinks.patch new file mode 100644 index 00000000000..a975c552237 --- /dev/null +++ b/queue-2.6.32/fix-lookup_follow-on-automount-symlinks.patch @@ -0,0 +1,49 @@ +From ac278a9c505092dd82077a2446af8f9fc0d9c095 Mon Sep 17 00:00:00 2001 +From: Al Viro +Date: Tue, 16 Feb 2010 18:09:36 +0000 +Subject: fix LOOKUP_FOLLOW on automount "symlinks" + +From: Al Viro + +commit ac278a9c505092dd82077a2446af8f9fc0d9c095 upstream. + +Make sure that automount "symlinks" are followed regardless of LOOKUP_FOLLOW; +it should have no effect on them. + +Signed-off-by: Al Viro +Signed-off-by: Greg Kroah-Hartman + +--- + fs/namei.c | 14 ++++++++++++-- + 1 file changed, 12 insertions(+), 2 deletions(-) + +--- a/fs/namei.c ++++ b/fs/namei.c +@@ -829,6 +829,17 @@ fail: + } + + /* ++ * 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 + * the final dentry. We expect 'base' to be positive and a directory. +@@ -964,8 +975,7 @@ last_component: + 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; diff --git a/queue-2.6.32/series b/queue-2.6.32/series new file mode 100644 index 00000000000..20894ee07c3 --- /dev/null +++ b/queue-2.6.32/series @@ -0,0 +1 @@ +fix-lookup_follow-on-automount-symlinks.patch