Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1031401AbbEEJ0C (ORCPT ); Tue, 5 May 2015 05:26:02 -0400 Received: from cantor2.suse.de ([195.135.220.15]:33550 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1031384AbbEEJZx (ORCPT ); Tue, 5 May 2015 05:25:53 -0400 Date: Tue, 5 May 2015 11:25:51 +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 12/79] debugfs: switch to simple_follow_link() Message-ID: <20150505092551.GJ11943@quack.suse.cz> References: <20150505052205.GS889@ZenIV.linux.org.uk> <1430803373-4948-12-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-12-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: 3135 Lines: 95 On Tue 05-05-15 06:21:46, Al Viro wrote: > From: Al Viro > > Signed-off-by: Al Viro Looks good. You can add: Reviewed-by: Jan Kara Honza > --- > fs/debugfs/file.c | 12 ------------ > fs/debugfs/inode.c | 6 +++--- > include/linux/debugfs.h | 1 - > 3 files changed, 3 insertions(+), 16 deletions(-) > > diff --git a/fs/debugfs/file.c b/fs/debugfs/file.c > index 830a7e7..284f9aa 100644 > --- a/fs/debugfs/file.c > +++ b/fs/debugfs/file.c > @@ -17,7 +17,6 @@ > #include > #include > #include > -#include > #include > #include > #include > @@ -43,17 +42,6 @@ const struct file_operations debugfs_file_operations = { > .llseek = noop_llseek, > }; > > -static void *debugfs_follow_link(struct dentry *dentry, struct nameidata *nd) > -{ > - nd_set_link(nd, d_inode(dentry)->i_private); > - return NULL; > -} > - > -const struct inode_operations debugfs_link_operations = { > - .readlink = generic_readlink, > - .follow_link = debugfs_follow_link, > -}; > - > static int debugfs_u8_set(void *data, u64 val) > { > *(u8 *)data = val; > diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c > index c1e7ffb..7eaec88 100644 > --- a/fs/debugfs/inode.c > +++ b/fs/debugfs/inode.c > @@ -174,7 +174,7 @@ static void debugfs_evict_inode(struct inode *inode) > truncate_inode_pages_final(&inode->i_data); > clear_inode(inode); > if (S_ISLNK(inode->i_mode)) > - kfree(inode->i_private); > + kfree(inode->i_link); > } > > static const struct super_operations debugfs_super_operations = { > @@ -511,8 +511,8 @@ struct dentry *debugfs_create_symlink(const char *name, struct dentry *parent, > return failed_creating(dentry); > } > inode->i_mode = S_IFLNK | S_IRWXUGO; > - inode->i_op = &debugfs_link_operations; > - inode->i_private = link; > + inode->i_op = &simple_symlink_inode_operations; > + inode->i_link = link; > d_instantiate(dentry, inode); > return end_creating(dentry); > } > diff --git a/include/linux/debugfs.h b/include/linux/debugfs.h > index cb25af4..420311b 100644 > --- a/include/linux/debugfs.h > +++ b/include/linux/debugfs.h > @@ -45,7 +45,6 @@ extern struct dentry *arch_debugfs_dir; > > /* declared over in file.c */ > extern const struct file_operations debugfs_file_operations; > -extern const struct inode_operations debugfs_link_operations; > > struct dentry *debugfs_create_file(const char *name, umode_t mode, > struct dentry *parent, void *data, > -- > 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/