From htejun@gmail.com Mon Aug 20 05:36:51 2007 From: Tejun Heo Date: Mon, 20 Aug 2007 21:36:29 +0900 Subject: [PATCH 03/14] sysfs: Remove sysfs_instantiate To: ebiederm@xmission.com, cornelia.huck@de.ibm.com, greg@kroah.com, linux-kernel@vger.kernel.org, satyam@infradead.org, stern@rowland.harvard.edu, containers@lists.osdl.org, htejun@gmail.com Cc: Eric W. Biederman , Tejun Heo Message-ID: <11876133891225-git-send-email-htejun@gmail.com> From: Eric W. Biederman Now that sysfs_get_inode is dropping the inode lock we no longer have a need from sysfs_instantiate. Signed-off-by: Eric W. Biederman Signed-off-by: Tejun Heo Cc: Cornelia Huck Signed-off-by: Greg Kroah-Hartman --- fs/sysfs/dir.c | 2 +- fs/sysfs/inode.c | 17 ----------------- fs/sysfs/sysfs.h | 1 - 3 files changed, 1 insertion(+), 19 deletions(-) --- a/fs/sysfs/dir.c +++ b/fs/sysfs/dir.c @@ -773,7 +773,7 @@ static struct dentry * sysfs_lookup(stru goto out_unlock; } - sysfs_instantiate(dentry, inode); + d_instantiate(dentry, inode); sysfs_attach_dentry(sd, dentry); out_unlock: --- a/fs/sysfs/inode.c +++ b/fs/sysfs/inode.c @@ -211,23 +211,6 @@ struct inode * sysfs_get_inode(struct sy return inode; } -/** - * sysfs_instantiate - instantiate dentry - * @dentry: dentry to be instantiated - * @inode: inode associated with @sd - * - * Unlock @inode if locked and instantiate @dentry with @inode. - * - * LOCKING: - * None. - */ -void sysfs_instantiate(struct dentry *dentry, struct inode *inode) -{ - BUG_ON(!dentry || dentry->d_inode); - - d_instantiate(dentry, inode); -} - int sysfs_hash_and_remove(struct sysfs_dirent *dir_sd, const char *name) { struct sysfs_addrm_cxt acxt; --- a/fs/sysfs/sysfs.h +++ b/fs/sysfs/sysfs.h @@ -69,7 +69,6 @@ extern void sysfs_remove_one(struct sysf extern void sysfs_addrm_finish(struct sysfs_addrm_cxt *acxt); extern struct inode * sysfs_get_inode(struct sysfs_dirent *sd); -extern void sysfs_instantiate(struct dentry *dentry, struct inode *inode); extern void release_sysfs_dirent(struct sysfs_dirent * sd); extern struct sysfs_dirent *sysfs_find_dirent(struct sysfs_dirent *parent_sd,