From: Dr. David Alan Gilbert Date: Mon, 13 Dec 2010 17:09:52 +0000 (+0000) Subject: hpfs_setattr error case avoids unlock_kernel X-Git-Tag: v2.6.38-rc1~22^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=274052ef0bac011249925f6616d147b1491fc601;p=platform%2Fupstream%2Fkernel-adaptation-pc.git 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 Signed-off-by: Al Viro --- diff --git a/fs/hpfs/inode.c b/fs/hpfs/inode.c index 56f0da1..1ae35ba 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);