Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758369Ab0GOCRv (ORCPT ); Wed, 14 Jul 2010 22:17:51 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46926 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758299Ab0GOCRf (ORCPT ); Wed, 14 Jul 2010 22:17:35 -0400 Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells Subject: [PATCH 16/18] xstat: Remove the automount through follow_link() kludge code from pathwalk [ver #6] To: viro@ZenIV.linux.org.uk Cc: dhowells@redhat.com, linux-fsdevel@vger.kernel.org, linux-nfs@vger.kernel.org, linux-cifs@vger.kernel.org, linux-kernel@vger.kernel.org, samba-technical@lists.samba.org, linux-ext4@vger.kernel.org Date: Thu, 15 Jul 2010 03:17:28 +0100 Message-ID: <20100715021728.5544.68615.stgit@warthog.procyon.org.uk> In-Reply-To: <20100715021709.5544.64506.stgit@warthog.procyon.org.uk> References: <20100715021709.5544.64506.stgit@warthog.procyon.org.uk> User-Agent: StGIT/0.14.3 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1839 Lines: 57 Remove the automount through follow_link() kludge code from pathwalk in favour of using d_automount(). Signed-off-by: David Howells --- fs/namei.c | 17 +++-------------- 1 files changed, 3 insertions(+), 14 deletions(-) diff --git a/fs/namei.c b/fs/namei.c index fcec3c6..86068a2 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -845,17 +845,6 @@ 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. @@ -975,7 +964,8 @@ last_component: if (err) break; inode = next.dentry->d_inode; - if (follow_on_final(inode, lookup_flags)) { + if (inode && unlikely(inode->i_op->follow_link) && + (lookup_flags & LOOKUP_FOLLOW)) { err = do_follow_link(&next, nd); if (err) goto return_err; @@ -1888,8 +1878,7 @@ reval: struct inode *inode = path.dentry->d_inode; void *cookie; error = -ELOOP; - /* S_ISDIR part is a temporary automount kludge */ - if (!(nd.flags & LOOKUP_FOLLOW) && !S_ISDIR(inode->i_mode)) + if (!(nd.flags & LOOKUP_FOLLOW)) goto exit_dput; if (count++ == 32) goto exit_dput; -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/