aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2007-08-20 08:36:29 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2007-10-12 17:51:07 -0400
commit119dd52be33dfe6285f586ab7354897fdefc7e23 (patch)
treef7422f753f3605401d4ee0a34b85fb7a0038fbf3 /fs
parent372e88bd1922228e0a55228f6dc8e311d1696fa0 (diff)
sysfs: Remove sysfs_instantiate
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> Signed-off-by: Tejun Heo <htejun@gmail.com> Cc: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'fs')
-rw-r--r--fs/sysfs/dir.c2
-rw-r--r--fs/sysfs/inode.c17
-rw-r--r--fs/sysfs/sysfs.h1
3 files changed, 1 insertions, 19 deletions
diff --git a/fs/sysfs/dir.c b/fs/sysfs/dir.c
index 5a70a93fc2f7..739dda176b43 100644
--- a/fs/sysfs/dir.c
+++ b/fs/sysfs/dir.c
@@ -773,7 +773,7 @@ static struct dentry * sysfs_lookup(struct inode *dir, struct dentry *dentry,
773 goto out_unlock; 773 goto out_unlock;
774 } 774 }
775 775
776 sysfs_instantiate(dentry, inode); 776 d_instantiate(dentry, inode);
777 sysfs_attach_dentry(sd, dentry); 777 sysfs_attach_dentry(sd, dentry);
778 778
779 out_unlock: 779 out_unlock:
diff --git a/fs/sysfs/inode.c b/fs/sysfs/inode.c
index 200e1bf6f932..0d706a86d2c7 100644
--- a/fs/sysfs/inode.c
+++ b/fs/sysfs/inode.c
@@ -211,23 +211,6 @@ struct inode * sysfs_get_inode(struct sysfs_dirent *sd)
211 return inode; 211 return inode;
212} 212}
213 213
214/**
215 * sysfs_instantiate - instantiate dentry
216 * @dentry: dentry to be instantiated
217 * @inode: inode associated with @sd
218 *
219 * Unlock @inode if locked and instantiate @dentry with @inode.
220 *
221 * LOCKING:
222 * None.
223 */
224void sysfs_instantiate(struct dentry *dentry, struct inode *inode)
225{
226 BUG_ON(!dentry || dentry->d_inode);
227
228 d_instantiate(dentry, inode);
229}
230
231int sysfs_hash_and_remove(struct sysfs_dirent *dir_sd, const char *name) 214int sysfs_hash_and_remove(struct sysfs_dirent *dir_sd, const char *name)
232{ 215{
233 struct sysfs_addrm_cxt acxt; 216 struct sysfs_addrm_cxt acxt;
diff --git a/fs/sysfs/sysfs.h b/fs/sysfs/sysfs.h
index 043675471031..8a0aea1ab86d 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,
69extern void sysfs_addrm_finish(struct sysfs_addrm_cxt *acxt); 69extern void sysfs_addrm_finish(struct sysfs_addrm_cxt *acxt);
70 70
71extern struct inode * sysfs_get_inode(struct sysfs_dirent *sd); 71extern struct inode * sysfs_get_inode(struct sysfs_dirent *sd);
72extern void sysfs_instantiate(struct dentry *dentry, struct inode *inode);
73 72
74extern void release_sysfs_dirent(struct sysfs_dirent * sd); 73extern void release_sysfs_dirent(struct sysfs_dirent * sd);
75extern struct sysfs_dirent *sysfs_find_dirent(struct sysfs_dirent *parent_sd, 74extern struct sysfs_dirent *sysfs_find_dirent(struct sysfs_dirent *parent_sd,