diff options
author | Tejun Heo <tj@kernel.org> | 2013-11-28 14:54:30 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-11-29 17:55:10 -0800 |
commit | ccf73cf336dc55bc52748205dee998d2fd4a8808 (patch) | |
tree | 8e3a3b9891e6b9d4804299cd23110c91d8f8016e /fs/sysfs/mount.c | |
parent | 517e64f57883bd63c5a4ab8b3d0d3ed68c55d0cf (diff) | |
download | blackbird-obmc-linux-ccf73cf336dc55bc52748205dee998d2fd4a8808.tar.gz blackbird-obmc-linux-ccf73cf336dc55bc52748205dee998d2fd4a8808.zip |
sysfs, kernfs: introduce kernfs[_find_and]_get() and kernfs_put()
Introduce kernfs interface for finding, getting and putting
sysfs_dirents.
* sysfs_find_dirent() is renamed to kernfs_find_ns() and lockdep
assertion for sysfs_mutex is added.
* sysfs_get_dirent_ns() is renamed to kernfs_find_and_get().
* Macro inline dancing around __sysfs_get/put() are removed and
kernfs_get/put() are made proper functions implemented in
fs/sysfs/dir.c.
While the conversions are mostly equivalent, there's one difference -
kernfs_get() doesn't return the input param as its return value. This
change is intentional. While passing through the input increases
writability in some areas, it is unnecessary and has been shown to
cause confusion regarding how the last ref is handled.
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/sysfs/mount.c')
-rw-r--r-- | fs/sysfs/mount.c | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/fs/sysfs/mount.c b/fs/sysfs/mount.c index 8c24bce2f4ae..852d11519f98 100644 --- a/fs/sysfs/mount.c +++ b/fs/sysfs/mount.c @@ -184,17 +184,3 @@ out_err: sysfs_dir_cachep = NULL; goto out; } - -#undef sysfs_get -struct sysfs_dirent *sysfs_get(struct sysfs_dirent *sd) -{ - return __sysfs_get(sd); -} -EXPORT_SYMBOL_GPL(sysfs_get); - -#undef sysfs_put -void sysfs_put(struct sysfs_dirent *sd) -{ - __sysfs_put(sd); -} -EXPORT_SYMBOL_GPL(sysfs_put); |