aboutsummaryrefslogtreecommitdiffstats
path: root/fs/sysfs/inode.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2013-10-24 11:49:10 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-10-29 18:12:07 -0400
commit7eed6ecb0785681892ab1fe47188fc981241cfd0 (patch)
tree5f1c88f8bc17ae7beffcf0ed319ca9708bd3a082 /fs/sysfs/inode.c
parentbaa97cb50724e72ece05a7cead6533a9658ddf79 (diff)
sysfs: move sysfs_hash_and_remove() to fs/sysfs/dir.c
Most removal related logic is implemented in fs/sysfs/dir.c. Move sysfs_hash_and_remove() to fs/sysfs/dir.c so that __sysfs_remove() doesn't have to be public. This is pure relocation. Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/sysfs/inode.c')
-rw-r--r--fs/sysfs/inode.c26
1 files changed, 0 insertions, 26 deletions
diff --git a/fs/sysfs/inode.c b/fs/sysfs/inode.c
index 825c55607af8..1750f790af3b 100644
--- a/fs/sysfs/inode.c
+++ b/fs/sysfs/inode.c
@@ -314,32 +314,6 @@ void sysfs_evict_inode(struct inode *inode)
314 sysfs_put(sd); 314 sysfs_put(sd);
315} 315}
316 316
317int sysfs_hash_and_remove(struct sysfs_dirent *dir_sd, const char *name,
318 const void *ns)
319{
320 struct sysfs_addrm_cxt acxt;
321 struct sysfs_dirent *sd;
322
323 if (!dir_sd) {
324 WARN(1, KERN_WARNING "sysfs: can not remove '%s', no directory\n",
325 name);
326 return -ENOENT;
327 }
328
329 sysfs_addrm_start(&acxt);
330
331 sd = sysfs_find_dirent(dir_sd, name, ns);
332 if (sd)
333 __sysfs_remove(&acxt, sd);
334
335 sysfs_addrm_finish(&acxt);
336
337 if (sd)
338 return 0;
339 else
340 return -ENOENT;
341}
342
343int sysfs_permission(struct inode *inode, int mask) 317int sysfs_permission(struct inode *inode, int mask)
344{ 318{
345 struct sysfs_dirent *sd; 319 struct sysfs_dirent *sd;