diff options
author | Tejun Heo <tj@kernel.org> | 2013-10-24 17:49:10 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-10-29 23:12:07 +0100 |
commit | 7eed6ecb0785681892ab1fe47188fc981241cfd0 (patch) | |
tree | 5f1c88f8bc17ae7beffcf0ed319ca9708bd3a082 /fs/sysfs/inode.c | |
parent | sysfs: remove unused sysfs_get_dentry() prototype (diff) | |
download | linux-7eed6ecb0785681892ab1fe47188fc981241cfd0.tar.xz linux-7eed6ecb0785681892ab1fe47188fc981241cfd0.zip |
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.c | 26 |
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) sysfs_put(sd); } -int sysfs_hash_and_remove(struct sysfs_dirent *dir_sd, const char *name, - const void *ns) -{ - struct sysfs_addrm_cxt acxt; - struct sysfs_dirent *sd; - - if (!dir_sd) { - WARN(1, KERN_WARNING "sysfs: can not remove '%s', no directory\n", - name); - return -ENOENT; - } - - sysfs_addrm_start(&acxt); - - sd = sysfs_find_dirent(dir_sd, name, ns); - if (sd) - __sysfs_remove(&acxt, sd); - - sysfs_addrm_finish(&acxt); - - if (sd) - return 0; - else - return -ENOENT; -} - int sysfs_permission(struct inode *inode, int mask) { struct sysfs_dirent *sd; |