Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3864109pxb; Tue, 17 Nov 2020 05:41:51 -0800 (PST) X-Google-Smtp-Source: ABdhPJzKv74OVRxZVZViXCz2WEzqmIGJtWrKN+XQC/rHSdT/9sHsLw5RZ2XwIN7XK5g6xiqJ9i8w X-Received: by 2002:aa7:c90a:: with SMTP id b10mr20060691edt.266.1605620511514; Tue, 17 Nov 2020 05:41:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605620511; cv=none; d=google.com; s=arc-20160816; b=k5aomz+jZW7JlLMEZ/Bmbxz5FQn/L+vpLBlVZetDjn9whCc/lZRVqM3Ag8OJA7WQS6 IlwPMUZetIhidCR/GnP6gloJVRP/fgvpYWR8phCvCQ6aAA8aszDCaQ+nu6zfp5YYl8wI YR7DdkUPK8P5N22zOl5WiXwBUzUrYYFMN06zBLUFmPpEeABeR59rhfFIj5MiljavW0fD OxyNktQrY3p0B/3KThk3mqFyb8D68Sxv/sRb/of334fwR9s4R9pG3QJIyF9g+BXCmCAm 3oae6SbgLZLEoPuvx2TARsXQdV5q28e2sHFtDBji6qYHUeELDyjboRlBxPxk49JJeItQ HRCg== 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=hgEJmVAPixIGzNHwneGib+w4d40Z69yXkbNBcvMNCZE=; b=Klm+fdqogZs1fp0dgVRFaKI/WcTm1lht6E/t0+dkQlBc4uslgG9XiNBrvbLEYvXRDo cxCUEBz3UKK3g5MXzVTsu5CZj68v7hM6A15zAPpdORdUECWOSWs2EtxlR79kQjHYzBWG XisxcPYGJixlwwlZHZODTFGSKEDBx0gvApPDi7qXMjbmQgJ64yakX/N1D0HTFUttHtI4 KD6BguWmG0rq8EIeo/36ZhZR9hjZqPupU0GBYuZE3qwekkMqpfcMB0W+3PhCaFwPpUq8 9+X0XlJim0J+Q/xaKR2j0/vpnMbSXpc8DeZyT17LwUjwSqIA3NuqRfTsGOPPTRao2Pad FH9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=mp8DIi8P; 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 f4si13866935edq.363.2020.11.17.05.41.25; Tue, 17 Nov 2020 05:41:51 -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=mp8DIi8P; 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 S1733009AbgKQNhx (ORCPT + 99 others); Tue, 17 Nov 2020 08:37:53 -0500 Received: from mail.kernel.org ([198.145.29.99]:49098 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732995AbgKQNhu (ORCPT ); Tue, 17 Nov 2020 08:37:50 -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 13871207BC; Tue, 17 Nov 2020 13:37:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1605620269; bh=y2WvLAalC27K0xG+siRaph21xFn5zhQat78rNOQ0STw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mp8DIi8Pt7PlksQLIK8HiK5OP/EgkEgX2kJAex9z9TtXf9A61Ss/UArWtnn+u1Uvc HlQ1zCfrtoSVa4/MydRInlWfYp8IQDNGxscLFzkCHbSefmUMX1GEbVzPTuKaFkCr5a wobMNEqjRUKkt+HHuVoXJ62F/JVrhCbqblrM4Fxw= 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 5.9 163/255] xfs: fix a missing unlock on error in xfs_fs_map_blocks Date: Tue, 17 Nov 2020 14:05:03 +0100 Message-Id: <20201117122146.870533645@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201117122138.925150709@linuxfoundation.org> References: <20201117122138.925150709@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 b101feb2aab45..f3082a957d5e1 100644 --- a/fs/xfs/xfs_pnfs.c +++ b/fs/xfs/xfs_pnfs.c @@ -134,7 +134,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