Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3848269pxb; Tue, 17 Nov 2020 05:19:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJx3BuSp24TcV0oL/Xgq6/q9E9a1jidxXQPe4eCfbpw1JdHrQX+Qvvx7JqbkZdVE3moq/LAw X-Received: by 2002:aa7:c2d7:: with SMTP id m23mr20566704edp.230.1605619148800; Tue, 17 Nov 2020 05:19:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605619148; cv=none; d=google.com; s=arc-20160816; b=pTivtKrp3xvbCRinCdvpLuMcyrOvhHUHxfUiQgbQEQ6OBCkhTlhimoAtSp/HuFdrSt g5ulBPlnyXsFQs/NSvN+ncrZjfhv1aGUayWY1lN4so/iUo/kMMZaN7wITmvqo4Xr7nwm ycailPSQPRSisvGXvMHuN/ESEGh0txh1BP+uQqVJRNMI3T/6m96IG8vzcUPpYgwchV+a QeKFzP7G2bsAaM725OYg9B6J6ClzDqq4XyPaNq9/JKn7PDrD9J5zUig7eH/eTW2TQHdt Q9qWuohvj2TragtyEBhXuK1+yspadWttLlwBQLxwkaj2/i8kbmhafJH7uXujpUxUA4rS cY3g== 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=didvWHf7AeOUyfjYHRCknULCVaDdgD/DA5zypTZ4Nvo=; b=rkvEZwszjovFCkqNFs8atvxpIgidYRFf3Edij/K1bk4/50g437gmIpe56G1Pj2cahr jiyj+pHhjwFKy5y5HM4iX2fIssFWFDMTgDlfDRqzVPrvZbW5zPuDCYppbq8kkVFqFVGI 51SLa2rIFpFkSCZK4hGfY1GBtoVbogmwe/zoHaoPfdTI5B8DHTiZ9FhqLSHMpP7ti0Ba AiXJxNVrvDZbT8dB6zZoC+Z7zZfzK89fytAnuurpafjd4/whYrL94aI1QpBBjsoohvra 2Gsyi1Q2LaF2s28wRSN88X6Bipi6zWhjEthdBfsVlKcZfm1bzixJZF0oLYsBI6Dc63I/ LdTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=rweP9sxo; 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 h16si9936418edv.359.2020.11.17.05.18.45; Tue, 17 Nov 2020 05:19:08 -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=rweP9sxo; 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 S1730258AbgKQNQV (ORCPT + 99 others); Tue, 17 Nov 2020 08:16:21 -0500 Received: from mail.kernel.org ([198.145.29.99]:47958 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730283AbgKQNQM (ORCPT ); Tue, 17 Nov 2020 08:16:12 -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 B0FB5241A5; Tue, 17 Nov 2020 13:16:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1605618972; bh=m0KHRErsmLzLZOReWx04lHpUuScteSZcRZOFLi/rD30=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rweP9sxoLnGsoULJBeoeXUOZiZ8b8szsKGSV6P/+eNkk23RIrqtkfVr4L0Ig4iefX QZ245YVPcKzKbx78BgS8PvS8wor7Xbm+JGVI7lx6EltQVdBWwrjASa41TVqGodw9+J +f+OSeEp+Mo7vJv67ZbwazUw8r9IReVFEFLLay/Y= 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.14 40/85] xfs: fix a missing unlock on error in xfs_fs_map_blocks Date: Tue, 17 Nov 2020 14:05:09 +0100 Message-Id: <20201117122112.988739666@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201117122111.018425544@linuxfoundation.org> References: <20201117122111.018425544@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 aa6c5c193f458..8538916d255ea 100644 --- a/fs/xfs/xfs_pnfs.c +++ b/fs/xfs/xfs_pnfs.c @@ -140,7 +140,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