summaryrefslogtreecommitdiff
path: root/fs/hpfs/inode.c
diff options
context:
space:
mode:
authorDr. David Alan Gilbert <linux@treblig.org>2010-12-13 20:09:52 +0300
committerAl Viro <viro@zeniv.linux.org.uk>2011-01-17 13:11:37 +0300
commit274052ef0bac011249925f6616d147b1491fc601 (patch)
treec94e7269bf7d3b7f16ad33789c5730a8e0445e44 /fs/hpfs/inode.c
parente0bb6bda43e20aa1db5774c73a519cd52c463a55 (diff)
downloadlinux-274052ef0bac011249925f6616d147b1491fc601.tar.xz
hpfs_setattr error case avoids unlock_kernel
This fixed a case that 'sparse' spotted where hpfs_setattr has an error return that didn't go through it's path that unlocks. This is against git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git version 6313e3c21743cc88bb5bd8aa72948ee1e83937b6. Build tested only, I don't have an hpfs file system to test. Dave Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/hpfs/inode.c')
-rw-r--r--fs/hpfs/inode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/hpfs/inode.c b/fs/hpfs/inode.c
index 56f0da1cfd10..1ae35baa539e 100644
--- a/fs/hpfs/inode.c
+++ b/fs/hpfs/inode.c
@@ -281,7 +281,7 @@ int hpfs_setattr(struct dentry *dentry, struct iattr *attr)
attr->ia_size != i_size_read(inode)) {
error = vmtruncate(inode, attr->ia_size);
if (error)
- return error;
+ goto out_unlock;
}
setattr_copy(inode, attr);