projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
fix setattr error handling in sysfs, configfs
[firefly-linux-kernel-4.4.55.git]
/
fs
/
sysfs
/
inode.c
diff --git
a/fs/sysfs/inode.c
b/fs/sysfs/inode.c
index bde1a4c3679a3c38bb5005a473fce4c8e3037e54..0835a3b70e03b01738a8ef18493e1c6180432acd 100644
(file)
--- a/
fs/sysfs/inode.c
+++ b/
fs/sysfs/inode.c
@@
-117,11
+117,13
@@
int sysfs_setattr(struct dentry *dentry, struct iattr *iattr)
if (error)
goto out;
+ error = sysfs_sd_setattr(sd, iattr);
+ if (error)
+ goto out;
+
/* this ignores size changes */
generic_setattr(inode, iattr);
- error = sysfs_sd_setattr(sd, iattr);
-
out:
mutex_unlock(&sysfs_mutex);
return error;