Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3852065pxb; Tue, 17 Nov 2020 05:24:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJyald+VTvIZE2idydadbtT3ie8YIcF8srJ6XKepks7dYC2awkNZsgu+vXqwV5MtgEINAYYZ X-Received: by 2002:a17:906:1b09:: with SMTP id o9mr20140252ejg.79.1605619471302; Tue, 17 Nov 2020 05:24:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605619471; cv=none; d=google.com; s=arc-20160816; b=iM9YICuPMRxZ3rmEL6tv3DYV4FiFGWqGHLlepsba4iiWxjh2Ws08tU5k/po+Z3OP77 oFdAMl3E80Q3p8YeW2dAS6U9ITfVfDjK4rNT26k7Abhwom7FTe6KWGO/RnX1Wut6bhex DC8Q/TmSjOnp812b3HQyJeONqd/RDYLanmLsWjHEeRGj5tP5olq+7ix3VNkzlc09Jied iA6+0iXHGO4wkaLfEngfgc5fiSVlkNA1UQX1kOvhtgdZ0zJb87hoL0iid9kvfeauVotk grCffv6BVneElLmmDhZxOlJblZwkq0xAXeT4EFZV3CNOwOv424zrfIhHffybTRc/SnmQ d16A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=CqKNHCXMZfIwFQn88k6PR5HRHJa0/8bHphuP6oNUwtU=; b=a+czVa59mDCJO+O/yGbm+T6qWq1oQAYzYWVZIsC6WDy572ghN4mPf2XxMpTjY8N/jd Sblj16pHIz+9gYPNl5klEVIVtfMjVqxkVt9zcejK21TWKn0WSr87iJr4t9oSr5++18zZ ycAxzgctSTPCD7/5NEr2bipFrpHMmzLIoyTat3yAZDTm0T6VZfmDqhWP2e81CIhy8aJ3 et3Sq5yOG54yfngQlQd7wtvVQHUNS2MxT8zn4zWBO3DcAkSnCvxOG/nrMrygbns0yY1c +zZcEVLN6dZn+799RINXBLTv3uZkuQv6CCmfk0NmetfgPjoIlNfxMPQT/D4AKBpVF7Xm X+nQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=UTI0ngQk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f13si13995229edx.450.2020.11.17.05.24.08; Tue, 17 Nov 2020 05:24:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=UTI0ngQk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730449AbgKQNUB (ORCPT + 99 others); Tue, 17 Nov 2020 08:20:01 -0500 Received: from mail.kernel.org ([198.145.29.99]:53230 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730337AbgKQNTw (ORCPT ); Tue, 17 Nov 2020 08:19:52 -0500 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4CFB52463D; Tue, 17 Nov 2020 13:19:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1605619192; bh=5kKcpGw954eg3NVFCsOovNhQJgpF+nYHOfnUCzNLAJw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UTI0ngQkjIk7ZL/hsIBaljZVQdW2N3D16Fh48PVQDTmDD4rcUMvG62VKYwWuv4JgA UgVYveYMpQYtcJCGHDlN9AONetXOZI9X4lf5viFftDaZwNLEuBepR6KtUfsWZHbjuj T/efa9vq/EqkxWjn5vaSqqmSIr/pANWEQwCuoapE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Christoph Hellwig , "Darrick J. Wong" , Sasha Levin Subject: [PATCH 4.19 059/101] xfs: fix a missing unlock on error in xfs_fs_map_blocks Date: Tue, 17 Nov 2020 14:05:26 +0100 Message-Id: <20201117122115.978115770@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201117122113.128215851@linuxfoundation.org> References: <20201117122113.128215851@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Christoph Hellwig [ Upstream commit 2bd3fa793aaa7e98b74e3653fdcc72fa753913b5 ] We also need to drop the iolock when invalidate_inode_pages2 fails, not only on all other error or successful cases. Fixes: 527851124d10 ("xfs: implement pNFS export operations") Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Signed-off-by: Sasha Levin --- fs/xfs/xfs_pnfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/xfs/xfs_pnfs.c b/fs/xfs/xfs_pnfs.c index f44c3599527d0..1c9bced3e8601 100644 --- a/fs/xfs/xfs_pnfs.c +++ b/fs/xfs/xfs_pnfs.c @@ -141,7 +141,7 @@ xfs_fs_map_blocks( goto out_unlock; error = invalidate_inode_pages2(inode->i_mapping); if (WARN_ON_ONCE(error)) - return error; + goto out_unlock; end_fsb = XFS_B_TO_FSB(mp, (xfs_ufsize_t)offset + length); offset_fsb = XFS_B_TO_FSBT(mp, offset); -- 2.27.0