summaryrefslogtreecommitdiff
path: root/include/linux/sysfs.h
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2013-11-28 14:54:27 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-11-29 17:48:14 -0800
commit024f647117d697165aaadf3f1af1343b7000149a (patch)
tree79dcad5d6babfe359c443093fe7e5bed84322ef7 /include/linux/sysfs.h
parentd19b9846df64d8845be682b6318bd1aee246cf60 (diff)
downloadlwn-024f647117d697165aaadf3f1af1343b7000149a.tar.gz
lwn-024f647117d697165aaadf3f1af1343b7000149a.zip
sysfs, kernfs: introduce kernfs_notify()
Introduce kernfs interface to wake up poll(2) which takes and returns sysfs_dirents. sysfs_notify_dirent() is renamed to kernfs_notify() and sysfs_notify() is updated so that it doesn't directly grab sysfs_mutex but acquires the target sysfs_dirents using sysfs_get_dirent(). sysfs_notify_dirent() is reimplemented as a dumb inline wrapper around kernfs_notify(). This patch doesn't introduce any behavior changes. Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/sysfs.h')
-rw-r--r--include/linux/sysfs.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h
index 2bc735d3e938..0ab2b023b613 100644
--- a/include/linux/sysfs.h
+++ b/include/linux/sysfs.h
@@ -243,7 +243,6 @@ void sysfs_remove_link_from_group(struct kobject *kobj, const char *group_name,
const char *link_name);
void sysfs_notify(struct kobject *kobj, const char *dir, const char *attr);
-void sysfs_notify_dirent(struct sysfs_dirent *sd);
struct sysfs_dirent *sysfs_get_dirent_ns(struct sysfs_dirent *parent_sd,
const unsigned char *name,
const void *ns);
@@ -418,9 +417,6 @@ static inline void sysfs_notify(struct kobject *kobj, const char *dir,
const char *attr)
{
}
-static inline void sysfs_notify_dirent(struct sysfs_dirent *sd)
-{
-}
static inline struct sysfs_dirent *
sysfs_get_dirent_ns(struct sysfs_dirent *parent_sd, const unsigned char *name,
const void *ns)
@@ -466,4 +462,9 @@ sysfs_get_dirent(struct sysfs_dirent *parent_sd, const unsigned char *name)
return sysfs_get_dirent_ns(parent_sd, name, NULL);
}
+static inline void sysfs_notify_dirent(struct sysfs_dirent *sd)
+{
+ kernfs_notify(sd);
+}
+
#endif /* _SYSFS_H_ */