xfs: remove dead error handling code in xfs_dquot_disk_alloc()
authorBrian Foster <bfoster@redhat.com>
Tue, 7 Aug 2018 17:57:13 +0000 (10:57 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Tue, 7 Aug 2018 17:57:13 +0000 (10:57 -0700)
commit73971b172a435079340007bee12b4944cc599a8a
treed023a9d243196397d8715402e08027ae0ca0e5d9
parent2ba090d521c5e09f32316c179d25bb6f699d3568
xfs: remove dead error handling code in xfs_dquot_disk_alloc()

Colin Ian King reports that commit 82ff27bc52 ("xfs: automatic dfops
buffer relogging") leaves around some dead error handling code in
xfs_dquot_disk_alloc(). This was discovered via Coverity scan.

Since the associated commit eliminates the act of joining a buffer
to a dfops, this intermediate error state is no longer possible and
the error handling code can be removed. Since the caller cancels the
transaction on error, which cancels the dfops, eliminate the
unnecessary xfs_defer_cancel() call and error handling labels.

Fixes: 82ff27bc52 ("xfs: automatic dfops buffer relogging")
Reported-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
fs/xfs/xfs_dquot.c