Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1031379AbbEEJZK (ORCPT ); Tue, 5 May 2015 05:25:10 -0400 Received: from cantor2.suse.de ([195.135.220.15]:33405 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1031288AbbEEJZB (ORCPT ); Tue, 5 May 2015 05:25:01 -0400 Date: Tue, 5 May 2015 11:24:59 +0200 From: Jan Kara To: Al Viro Cc: Linus Torvalds , Neil Brown , Christoph Hellwig , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH 11/79] shmem: switch to simple_follow_link() Message-ID: <20150505092459.GI11943@quack.suse.cz> References: <20150505052205.GS889@ZenIV.linux.org.uk> <1430803373-4948-11-git-send-email-viro@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1430803373-4948-11-git-send-email-viro@ZenIV.linux.org.uk> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2053 Lines: 62 On Tue 05-05-15 06:21:45, Al Viro wrote: > From: Al Viro > > Signed-off-by: Al Viro Looks good. You can add: Reviewed-by: Jan Kara Honza > --- > mm/shmem.c | 9 ++------- > 1 file changed, 2 insertions(+), 7 deletions(-) > > diff --git a/mm/shmem.c b/mm/shmem.c > index de98137..7f6e2f8 100644 > --- a/mm/shmem.c > +++ b/mm/shmem.c > @@ -2451,6 +2451,7 @@ static int shmem_symlink(struct inode *dir, struct dentry *dentry, const char *s > return -ENOMEM; > } > inode->i_op = &shmem_short_symlink_operations; > + inode->i_link = info->symlink; > } else { > error = shmem_getpage(inode, 0, &page, SGP_WRITE, NULL); > if (error) { > @@ -2474,12 +2475,6 @@ static int shmem_symlink(struct inode *dir, struct dentry *dentry, const char *s > return 0; > } > > -static void *shmem_follow_short_symlink(struct dentry *dentry, struct nameidata *nd) > -{ > - nd_set_link(nd, SHMEM_I(d_inode(dentry))->symlink); > - return NULL; > -} > - > static void *shmem_follow_link(struct dentry *dentry, struct nameidata *nd) > { > struct page *page = NULL; > @@ -2642,7 +2637,7 @@ static ssize_t shmem_listxattr(struct dentry *dentry, char *buffer, size_t size) > > static const struct inode_operations shmem_short_symlink_operations = { > .readlink = generic_readlink, > - .follow_link = shmem_follow_short_symlink, > + .follow_link = simple_follow_link, > #ifdef CONFIG_TMPFS_XATTR > .setxattr = shmem_setxattr, > .getxattr = shmem_getxattr, > -- > 2.1.4 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- Jan Kara SUSE Labs, CR -- 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/