diff options
author | Tejun Heo <tj@kernel.org> | 2013-11-28 14:54:27 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-11-29 20:48:14 -0500 |
commit | 024f647117d697165aaadf3f1af1343b7000149a (patch) | |
tree | 79dcad5d6babfe359c443093fe7e5bed84322ef7 /include/linux/kernfs.h | |
parent | d19b9846df64d8845be682b6318bd1aee246cf60 (diff) |
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/kernfs.h')
-rw-r--r-- | include/linux/kernfs.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/kernfs.h b/include/linux/kernfs.h index ba993ebcd81e..f20796ecc76e 100644 --- a/include/linux/kernfs.h +++ b/include/linux/kernfs.h | |||
@@ -84,6 +84,7 @@ int kernfs_rename_ns(struct sysfs_dirent *sd, struct sysfs_dirent *new_parent, | |||
84 | const char *new_name, const void *new_ns); | 84 | const char *new_name, const void *new_ns); |
85 | void kernfs_enable_ns(struct sysfs_dirent *sd); | 85 | void kernfs_enable_ns(struct sysfs_dirent *sd); |
86 | int kernfs_setattr(struct sysfs_dirent *sd, const struct iattr *iattr); | 86 | int kernfs_setattr(struct sysfs_dirent *sd, const struct iattr *iattr); |
87 | void kernfs_notify(struct sysfs_dirent *sd); | ||
87 | 88 | ||
88 | #else /* CONFIG_SYSFS */ | 89 | #else /* CONFIG_SYSFS */ |
89 | 90 | ||
@@ -120,6 +121,8 @@ static inline int kernfs_setattr(struct sysfs_dirent *sd, | |||
120 | const struct iattr *iattr) | 121 | const struct iattr *iattr) |
121 | { return -ENOSYS; } | 122 | { return -ENOSYS; } |
122 | 123 | ||
124 | static inline void kernfs_notify(struct sysfs_dirent *sd) { } | ||
125 | |||
123 | #endif /* CONFIG_SYSFS */ | 126 | #endif /* CONFIG_SYSFS */ |
124 | 127 | ||
125 | static inline struct sysfs_dirent * | 128 | static inline struct sysfs_dirent * |