summaryrefslogtreecommitdiff
path: root/include/linux/kernfs.h
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2013-11-28 14:54:27 -0500
committerPawel Osmialowski <p.osmialowsk@mcdsrvbld02.digital.local>2015-03-27 14:37:30 +0100
commitcf98677723fb0e42fa2b41a370bf85332bd3c750 (patch)
treefe039a314b02737fe6e350a5e8e5cfce4e4efdde /include/linux/kernfs.h
parentea72c71344e75459493113b7d264f5973ebdcfb8 (diff)
downloadlinux-3.10-cf98677723fb0e42fa2b41a370bf85332bd3c750.tar.gz
linux-3.10-cf98677723fb0e42fa2b41a370bf85332bd3c750.tar.bz2
linux-3.10-cf98677723fb0e42fa2b41a370bf85332bd3c750.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/kernfs.h')
-rw-r--r--include/linux/kernfs.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/kernfs.h b/include/linux/kernfs.h
index ba993ebcd81..f20796ecc76 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,
const char *new_name, const void *new_ns);
void kernfs_enable_ns(struct sysfs_dirent *sd);
int kernfs_setattr(struct sysfs_dirent *sd, const struct iattr *iattr);
+void kernfs_notify(struct sysfs_dirent *sd);
#else /* CONFIG_SYSFS */
@@ -120,6 +121,8 @@ static inline int kernfs_setattr(struct sysfs_dirent *sd,
const struct iattr *iattr)
{ return -ENOSYS; }
+static inline void kernfs_notify(struct sysfs_dirent *sd) { }
+
#endif /* CONFIG_SYSFS */
static inline struct sysfs_dirent *