lkml.org 
[lkml]   [2007]   [Aug]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Date
Subject[PATCH 21/25] sysfs: call attr_kill_to_mode from sysfs_setattr
..and only save off ia_valid after it returns

Signed-off-by: Jeff Layton <jlayton@redhat.com>
---
fs/sysfs/inode.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/fs/sysfs/inode.c b/fs/sysfs/inode.c
index 10d1b52..38f2ba9 100644
--- a/fs/sysfs/inode.c
+++ b/fs/sysfs/inode.c
@@ -49,7 +49,7 @@ int sysfs_setattr(struct dentry * dentry, struct iattr * iattr)
struct inode * inode = dentry->d_inode;
struct sysfs_dirent * sd = dentry->d_fsdata;
struct iattr * sd_iattr;
- unsigned int ia_valid = iattr->ia_valid;
+ unsigned int ia_valid;
int error;

if (!sd)
@@ -57,6 +57,9 @@ int sysfs_setattr(struct dentry * dentry, struct iattr * iattr)

sd_iattr = sd->s_iattr;

+ attr_kill_to_mode(inode, iattr);
+ ia_valid = iattr->ia_valid;
+
error = inode_change_ok(inode, iattr);
if (error)
return error;
--
1.5.2.2
-
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: 2007-08-06 15:29    [W:0.019 / U:0.676 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site