lkml.org 
[lkml]   [2005]   [Jul]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch 03/29] sysfs: fix sysfs_setattr

From: Maneesh Soni <maneesh@in.ibm.com>

o sysfs_dirent's s_mode field should also be updated in sysfs_setattr(), else
there could be inconsistency in the two fields. s_mode is used while
->readdir so as not to bring in the inode to cache.

Signed-off-by: Maneesh Soni <maneesh@in.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
fs/sysfs/inode.c | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
--- gregkh-2.6.orig/fs/sysfs/inode.c 2005-07-29 11:30:03.000000000 -0700
+++ gregkh-2.6/fs/sysfs/inode.c 2005-07-29 11:33:53.000000000 -0700
@@ -85,7 +85,7 @@

if (!in_group_p(inode->i_gid) && !capable(CAP_FSETID))
mode &= ~S_ISGID;
- sd_iattr->ia_mode = mode;
+ sd_iattr->ia_mode = sd->s_mode = mode;
}

return error;
--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-07-30 04:01    [from the cache]
©2003-2011 Jasper Spaans