* [PATCH 21/25] sysfs: call attr_kill_to_mode from sysfs_setattr
@ 2007-07-24 17:19 Jeff Layton
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Layton @ 2007-07-24 17:19 UTC (permalink / raw)
To: linux-kernel, linux-fsdevel
..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
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 21/25] sysfs: call attr_kill_to_mode from sysfs_setattr
@ 2007-08-06 13:55 Jeff Layton
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Layton @ 2007-08-06 13:55 UTC (permalink / raw)
To: linux-kernel, linux-fsdevel
..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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-08-06 14:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-24 17:19 [PATCH 21/25] sysfs: call attr_kill_to_mode from sysfs_setattr Jeff Layton
2007-08-06 13:55 Jeff Layton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®