xfs: fix error gotos in xfs_setattr_nonsize
authorEric Sandeen <sandeen@redhat.com>
Fri, 28 Aug 2015 04:51:10 +0000 (14:51 +1000)
committerDave Chinner <david@fromorbit.com>
Fri, 28 Aug 2015 04:51:10 +0000 (14:51 +1000)
commit1a7ccad88d1bcebabc011b54a2f8615175e523fc
treec586b8b0d3d4ac614a7ead38c0ffd0eb205d4800
parent8774cf8bacd4e79b7c65cdf1208da264a9d436d2
xfs: fix error gotos in xfs_setattr_nonsize

As the code stands today, if xfs_trans_reserve() fails, we
goto out_dqrele, which does not free the allocated transaction.

Fix up the goto targets to undo everything properly.

Addresses-Coverity-Id: 145571
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
fs/xfs/xfs_iops.c