Skip to content

Commit

Permalink
hpfs_setattr error case avoids unlock_kernel
Browse files Browse the repository at this point in the history
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 6313e3c.

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>
  • Loading branch information
Dr. David Alan Gilbert authored and Al Viro committed Jan 17, 2011
1 parent e0bb6bd commit 274052e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/hpfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 274052e

Please sign in to comment.