From e14112c7d4e6f98e1ea5b26c7bf9f654b2fa6a5b Mon Sep 17 00:00:00 2001 From: "Eric W. Biederman" Date: Fri, 12 Feb 2010 19:22:23 -0800 Subject: [PATCH] --- yaml --- r: 187090 b: refs/heads/master c: f8d4f618fed5a4978afada52166bc2efaf7656d1 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/sysfs/inode.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 172a361c0411..b322fb4bf356 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: b35c74dab64f4c212f36d868419108556c9cf3e2 +refs/heads/master: f8d4f618fed5a4978afada52166bc2efaf7656d1 diff --git a/trunk/fs/sysfs/inode.c b/trunk/fs/sysfs/inode.c index 6a06a1d1ea7b..0d09f6c6efab 100644 --- a/trunk/fs/sysfs/inode.c +++ b/trunk/fs/sysfs/inode.c @@ -111,20 +111,20 @@ int sysfs_setattr(struct dentry *dentry, struct iattr *iattr) if (!sd) return -EINVAL; + mutex_lock(&sysfs_mutex); error = inode_change_ok(inode, iattr); if (error) - return error; + goto out; iattr->ia_valid &= ~ATTR_SIZE; /* ignore size changes */ error = inode_setattr(inode, iattr); if (error) - return error; + goto out; - mutex_lock(&sysfs_mutex); error = sysfs_sd_setattr(sd, iattr); +out: mutex_unlock(&sysfs_mutex); - return error; }