From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from aserp1040.oracle.com ([141.146.126.69]:36769 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750935AbcKEAJh (ORCPT ); Fri, 4 Nov 2016 20:09:37 -0400 Subject: [PATCH 15/16] xfs: check return value of _trans_reserve_quota_nblks From: "Darrick J. Wong" Date: Fri, 04 Nov 2016 17:09:32 -0700 Message-ID: <147830457222.26713.9534352090140316164.stgit@birch.djwong.org> In-Reply-To: <147830447710.26713.9536263528122988931.stgit@birch.djwong.org> References: <147830447710.26713.9536263528122988931.stgit@birch.djwong.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-xfs-owner@vger.kernel.org List-ID: List-Id: xfs To: david@fromorbit.com, darrick.wong@oracle.com Cc: linux-xfs@vger.kernel.org Check the return value of xfs_trans_reserve_quota_nblks for errors. Signed-off-by: Darrick J. Wong --- libxfs/xfs_bmap.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libxfs/xfs_bmap.c b/libxfs/xfs_bmap.c index 165d863..0e2f450 100644 --- a/libxfs/xfs_bmap.c +++ b/libxfs/xfs_bmap.c @@ -4897,6 +4897,8 @@ xfs_bmap_del_extent_delay( error = xfs_trans_reserve_quota_nblks(NULL, ip, -((long)del->br_blockcount), 0, isrt ? XFS_QMOPT_RES_RTBLKS : XFS_QMOPT_RES_REGBLKS); + if (error) + return error; ip->i_delayed_blks -= del->br_blockcount; if (whichfork == XFS_COW_FORK)