summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_log.c
diff options
context:
space:
mode:
authorBrian Foster <bfoster@redhat.com>2014-11-28 14:00:53 +1100
committerDave Chinner <david@fromorbit.com>2014-11-28 14:00:53 +1100
commit5d45ee1b41b02269ce04920a48cd2c6b2a458090 (patch)
tree772d6cfe61662d386549004c415eac8713d65b65 /fs/xfs/xfs_log.c
parent062647a8b41928f4fb97f967b24092be68f5f0f0 (diff)
downloadlinux-next-5d45ee1b41b02269ce04920a48cd2c6b2a458090.tar.gz
xfs: fix error handling in xfs_qm_log_quotaoff()
The error handling in xfs_qm_log_quotaoff() has a couple problems. If xfs_trans_commit() fails, we fall through to the error block and call xfs_trans_cancel(). This is incorrect on commit failure. If xfs_trans_reserve() fails, we jump to the error block, cancel the tp and restore the superblock qflags to oldsbqflag. However, oldsbqflag has been initialized to zero and not yet updated from the original flags so we set the flags to zero. Fix up the error handling in xfs_qm_log_quotaoff() to not restore flags if they haven't been modified and not cancel the tp on commit failure. Remove the flag restore code altogether because commit error is the only failure condition and we don't know whether the transaction made it to disk. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Brian Foster <bfoster@redhat.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/xfs/xfs_log.c')
0 files changed, 0 insertions, 0 deletions