From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 26CC2C3A5A3 for ; Tue, 27 Aug 2019 07:53:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E6B55206BF for ; Tue, 27 Aug 2019 07:53:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566892436; bh=tFqCp16aNSWR277rTmCPSwFTD5kGdcp9QL3VQurlJrk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=Lb3saJldlkdLAFLT40poU2d1cmuhS1t1eTtkdK7DYPA2Ia/l2I4fxzBTgh3kxUxsh CEWX/d0ymgsQEtW3qNDoYycEQZ4tIte7wzbr6XPyeuZoCrzc43vTghJ2VLGB/aMI2G TixLblez8++WA8QbEocrildKSOMs6bCx1evd9Kb8= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729939AbfH0Hxz (ORCPT ); Tue, 27 Aug 2019 03:53:55 -0400 Received: from mail.kernel.org ([198.145.29.99]:45486 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725825AbfH0Hxx (ORCPT ); Tue, 27 Aug 2019 03:53:53 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 3F7B120828; Tue, 27 Aug 2019 07:53:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566892432; bh=tFqCp16aNSWR277rTmCPSwFTD5kGdcp9QL3VQurlJrk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uoDTvznyaNyT7UfY6054FcjQKwlzJkBRApVODWPgJLKfrOJ44Nd6d/TRwlFziG3+/ n2xet9yubwleEM/WTlIjVxO+4uhV834wS1ww8GfshLZop/CPDWWaqVnWD6O4w2XTpO Ciac4i2wPJvWoD8sN2pm7Oniw+QRGv34DAe+zdK4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, ZhangXiaoxu , Mike Snitzer Subject: [PATCH 4.14 51/62] dm space map metadata: fix missing store of apply_bops() return value Date: Tue, 27 Aug 2019 09:50:56 +0200 Message-Id: <20190827072703.472679604@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190827072659.803647352@linuxfoundation.org> References: <20190827072659.803647352@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: ZhangXiaoxu commit ae148243d3f0816b37477106c05a2ec7d5f32614 upstream. In commit 6096d91af0b6 ("dm space map metadata: fix occasional leak of a metadata block on resize"), we refactor the commit logic to a new function 'apply_bops'. But when that logic was replaced in out() the return value was not stored. This may lead out() returning a wrong value to the caller. Fixes: 6096d91af0b6 ("dm space map metadata: fix occasional leak of a metadata block on resize") Cc: stable@vger.kernel.org Signed-off-by: ZhangXiaoxu Signed-off-by: Mike Snitzer Signed-off-by: Greg Kroah-Hartman --- drivers/md/persistent-data/dm-space-map-metadata.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/md/persistent-data/dm-space-map-metadata.c +++ b/drivers/md/persistent-data/dm-space-map-metadata.c @@ -248,7 +248,7 @@ static int out(struct sm_metadata *smm) } if (smm->recursion_count == 1) - apply_bops(smm); + r = apply_bops(smm); smm->recursion_count--;