diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-06-04 18:27:27 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-06-04 18:27:27 -0400 |
commit | f9196e7c03bfefbb8933c7af579c3c6caa72ea53 (patch) | |
tree | 8fa32c991375c382539c39b35603d2289b4610c6 /fs/sysfs/inode.c | |
parent | bf4282cbcf7f53c23e87fb0cef945591cdc8d631 (diff) | |
parent | 75de46b98dda624397ccb17c106e51f478a79c15 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6:
fix setattr error handling in sysfs, configfs
kobject: free memory if netlink_kernel_create() fails
lib/kobject_uevent.c: fix CONIG_NET=n warning
Diffstat (limited to 'fs/sysfs/inode.c')
-rw-r--r-- | fs/sysfs/inode.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/sysfs/inode.c b/fs/sysfs/inode.c index bde1a4c3679a..0835a3b70e03 100644 --- a/fs/sysfs/inode.c +++ b/fs/sysfs/inode.c | |||
@@ -117,11 +117,13 @@ int sysfs_setattr(struct dentry *dentry, struct iattr *iattr) | |||
117 | if (error) | 117 | if (error) |
118 | goto out; | 118 | goto out; |
119 | 119 | ||
120 | error = sysfs_sd_setattr(sd, iattr); | ||
121 | if (error) | ||
122 | goto out; | ||
123 | |||
120 | /* this ignores size changes */ | 124 | /* this ignores size changes */ |
121 | generic_setattr(inode, iattr); | 125 | generic_setattr(inode, iattr); |
122 | 126 | ||
123 | error = sysfs_sd_setattr(sd, iattr); | ||
124 | |||
125 | out: | 127 | out: |
126 | mutex_unlock(&sysfs_mutex); | 128 | mutex_unlock(&sysfs_mutex); |
127 | return error; | 129 | return error; |