From: Brian Foster Date: Fri, 28 Nov 2014 03:00:53 +0000 (+1100) Subject: xfs: fix error handling in xfs_qm_log_quotaoff() X-Git-Tag: omap-for-v3.19/fixes-rc1~115^2~3^2~2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5d45ee1b41b02269ce04920a48cd2c6b2a458090;p=pandora-kernel.git 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 Signed-off-by: Brian Foster Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner --- Reading git-diff-tree failed