[PATCH 02/25] sysfs: Remove sysfs_instantiate

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Greg KH <greg@...>
Cc: <linux-kernel@...>, <satyam@...>, <cornelia.huck@...>, <stern@...>, Tejun Heo <htejun@...>, Linux Containers <containers@...>, <gregkh@...>
Date: Tuesday, August 7, 2007 - 5:08 pm

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 <ebiederm@xmission.com>
---
 fs/sysfs/dir.c   |    2 +-
 fs/sysfs/inode.c |   17 -----------------
 fs/sysfs/sysfs.h |    1 -
 3 files changed, 1 insertions(+), 19 deletions(-)

diff --git a/fs/sysfs/dir.c b/fs/sysfs/dir.c
index ae06f4a..55d8299 100644
--- a/fs/sysfs/dir.c
+++ b/fs/sysfs/dir.c
@@ -771,7 +771,7 @@ static struct dentry * sysfs_lookup(struct inode *dir, struct dentry *dentry,
 		goto out_unlock;
 	}
 
-	sysfs_instantiate(dentry, inode);
+	d_instantiate(dentry, inode);
 	sysfs_attach_dentry(sd, dentry);
 
  out_unlock:
diff --git a/fs/sysfs/inode.c b/fs/sysfs/inode.c
index aefc346..70a2420 100644
--- a/fs/sysfs/inode.c
+++ b/fs/sysfs/inode.c
@@ -212,23 +212,6 @@ struct inode * sysfs_get_inode(struct sysfs_dirent *sd)
 	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;
diff --git a/fs/sysfs/sysfs.h b/fs/sysfs/sysfs.h
index 0436754..8a0aea1 100644
--- a/fs/sysfs/sysfs.h
+++ b/fs/sysfs/sysfs.h
@@ -69,7 +69,6 @@ extern void sysfs_remove_one(struct sysfs_addrm_cxt *acxt,
 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,
-- 
1.5.1.1.181.g2de0

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 0/25] Sysfs cleanups &amp; tagged directory support, Eric W. Biederman, (Tue Aug 7, 5:06 pm)
Re: [PATCH 0/25] Sysfs cleanups &amp; tagged directory support, Eric W. Biederman, (Wed Aug 8, 11:08 am)
Re: [PATCH 0/25] Sysfs cleanups &amp; tagged directory support, Eric W. Biederman, (Wed Aug 8, 11:53 am)
Re: [PATCH 0/25] Sysfs cleanups &amp; tagged directory support, Eric W. Biederman, (Wed Aug 8, 12:37 pm)
[PATCH 02/25] sysfs: Remove sysfs_instantiate, Eric W. Biederman, (Tue Aug 7, 5:08 pm)
Re: [PATCH 02/25] sysfs: Remove sysfs_instantiate, Tejun Heo, (Wed Aug 8, 2:37 am)
[PATCH 03/25] sysfs: Use kill_anon_super, Eric W. Biederman, (Tue Aug 7, 5:10 pm)
Re: [PATCH 03/25] sysfs: Use kill_anon_super, Tejun Heo, (Wed Aug 8, 2:50 am)
[PATCH 04/25] sysfs: Make sysfs_mount static, Eric W. Biederman, (Tue Aug 7, 5:11 pm)
Re: [PATCH 04/25] sysfs: Make sysfs_mount static, Tejun Heo, (Wed Aug 8, 2:51 am)
[PATCH 06/25] sysfs: Simplify readdir., Eric W. Biederman, (Tue Aug 7, 5:13 pm)
Re: [PATCH 06/25] sysfs: Simplify readdir., Tejun Heo, (Wed Aug 8, 3:12 am)
[PATCH 07/25] sysfs: Rewrite sysfs_drop_dentry., Eric W. Biederman, (Tue Aug 7, 5:14 pm)
[PATCH 08/25] sysfs: Implement __sysfs_get_dentry, Eric W. Biederman, (Tue Aug 7, 5:16 pm)
[PATCH 11/25] sysfs: Remove s_dentry, Eric W. Biederman, (Tue Aug 7, 5:19 pm)
Re: [PATCH 11/25] sysfs: Remove s_dentry, Tejun Heo, (Wed Aug 8, 3:46 am)
[PATCH 12/25] sysfs: Introduce sysfs_rename_mutex, Eric W. Biederman, (Tue Aug 7, 5:21 pm)
Re: [PATCH 12/25] sysfs: Introduce sysfs_rename_mutex, Eric W. Biederman, (Wed Aug 8, 4:28 am)
[PATCH 13/25] sysfs: Simply sysfs_get_dentry, Eric W. Biederman, (Tue Aug 7, 5:22 pm)
Re: [PATCH 13/25] sysfs: Simply sysfs_get_dentry, Tejun Heo, (Wed Aug 8, 4:24 am)
[PATCH 14/25] sysfs: Don't use lookup_one_len_kern, Eric W. Biederman, (Tue Aug 7, 5:23 pm)
Re: [PATCH 14/25] sysfs: Don't use lookup_one_len_kern, Eric W. Biederman, (Wed Aug 8, 11:26 am)
[PATCH 15/25] vfs: Remove lookup_one_len_kern, Eric W. Biederman, (Tue Aug 7, 5:25 pm)
Re: [PATCH 15/25] vfs: Remove lookup_one_len_kern, Tejun Heo, (Wed Aug 8, 4:39 am)
[PATCH 16/25] sysfs: Support for preventing unmounts., Eric W. Biederman, (Tue Aug 7, 5:26 pm)
[PATCH 17/25] sysfs: Rewrite rename in terms of sysfs dirents, Eric W. Biederman, (Tue Aug 7, 5:27 pm)
Re: [PATCH 17/25] sysfs: Rewrite rename in terms of sysfs di..., Eric W. Biederman, (Wed Aug 8, 11:32 am)
[PATCH 19/25] sysfs: sysfs_get_dentry add a sb parameter, Eric W. Biederman, (Tue Aug 7, 5:29 pm)
Re: [PATCH 19/25] sysfs: sysfs_get_dentry add a sb parameter, Eric W. Biederman, (Wed Aug 8, 11:34 am)
[PATCH 20/25] sysfs: Rename Support multiple superblocks, Eric W. Biederman, (Tue Aug 7, 5:31 pm)
Re: [PATCH 20/25] sysfs: Rename Support multiple superblocks, Eric W. Biederman, (Wed Aug 8, 11:45 am)
Re: [PATCH 20/25] sysfs: Rename Support multiple superblocks, Eric W. Biederman, (Wed Aug 8, 12:35 pm)
Re: [PATCH 20/25] sysfs: Rename Support multiple superblocks, Eric W. Biederman, (Wed Aug 8, 12:55 pm)
Re: alternative approached at tagged nodes, Tejun Heo, (Wed Aug 8, 12:31 pm)
[PATCH 2/5] sysfs: simplify sysfs_rename_dir(), Tejun Heo, (Thu Aug 2, 8:38 am)