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 <[EMAIL PROTECTED]>
---
 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 [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to