From a3945af7d347f306ce15b10e80df48d069decad6 Mon Sep 17 00:00:00 2001 From: Miklos Szeredi Date: Mon, 16 Jun 2008 13:46:47 +0200 Subject: [PATCH] --- yaml --- r: 104774 b: refs/heads/master c: 93265d13ea5c3ec5f61a8009407fbe046ce6b7c0 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/sysfs/file.c | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index eb35137f3638..29d66f40cfbd 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 838ea8e8dbfc8d907c7a55bbad507a44c1b81d57 +refs/heads/master: 93265d13ea5c3ec5f61a8009407fbe046ce6b7c0 diff --git a/trunk/fs/sysfs/file.c b/trunk/fs/sysfs/file.c index e7735f643cd1..3f07893ff896 100644 --- a/trunk/fs/sysfs/file.c +++ b/trunk/fs/sysfs/file.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -585,9 +586,11 @@ int sysfs_chmod_file(struct kobject *kobj, struct attribute *attr, mode_t mode) newattrs.ia_mode = (mode & S_IALLUGO) | (inode->i_mode & ~S_IALLUGO); newattrs.ia_valid = ATTR_MODE | ATTR_CTIME; - rc = notify_change(victim, &newattrs); + newattrs.ia_ctime = current_fs_time(inode->i_sb); + rc = sysfs_setattr(victim, &newattrs); if (rc == 0) { + fsnotify_change(victim, newattrs.ia_valid); mutex_lock(&sysfs_mutex); victim_sd->s_mode = newattrs.ia_mode; mutex_unlock(&sysfs_mutex);