[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1190277097165-git-send-email-htejun@gmail.com>
Date: Thu, 20 Sep 2007 17:31:37 +0900
From: Tejun Heo <htejun@...il.com>
To: ebiederm@...ssion.com, cornelia.huck@...ibm.com, greg@...ah.com,
stern@...land.harvard.edu, kay.sievers@...y.org,
linux-kernel@...r.kernel.org, htejun@...il.com
Cc: Tejun Heo <htejun@...il.com>
Subject: [PATCH 1/8] sysfs: notify file on deactivation
Notify file on deactivation so that the pollers get event when the
polled file dies, which is very easy to implement with sd based
interface.
Signed-off-by: Tejun Heo <htejun@...il.com>
---
fs/sysfs/dir.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/fs/sysfs/dir.c b/fs/sysfs/dir.c
index a74ca4a..d50d3ac 100644
--- a/fs/sysfs/dir.c
+++ b/fs/sysfs/dir.c
@@ -245,6 +245,10 @@ static void sysfs_deactivate(struct sysfs_dirent *sd)
*/
v = atomic_add_return(SD_DEACTIVATED_BIAS, &sd->s_active);
+ /* file is dying, notify pollers */
+ if (sysfs_type(sd) == SYSFS_FILE)
+ sysfs_notify_file(sd);
+
if (v != SD_DEACTIVATED_BIAS)
wait_for_completion(&wait);
--
1.5.0.3
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists