Message ID | 20210208145807.613541970@linuxfoundation.org |
---|---|
State | New |
Headers | show
Return-Path: <stable-owner@kernel.org> 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=-19.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, 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 68640C4332B for <stable@archiver.kernel.org>; Mon, 8 Feb 2021 15:17:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 39F7D64F3B for <stable@archiver.kernel.org>; Mon, 8 Feb 2021 15:17:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233583AbhBHPRG (ORCPT <rfc822;stable@archiver.kernel.org>); Mon, 8 Feb 2021 10:17:06 -0500 Received: from mail.kernel.org ([198.145.29.99]:56628 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230313AbhBHPMZ (ORCPT <rfc822;stable@vger.kernel.org>); Mon, 8 Feb 2021 10:12:25 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2346A64EF0; Mon, 8 Feb 2021 15:09:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1612796943; bh=BsInV7Qqjs9IreVVDcQb8FYQrXw1uxJaS1Yl21zguqE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VwFIULyADyzkaIFj/3p4Y66Y20TpzAyt/E9R6EfKdLe8z1KNAH273qVllTFbe/hfP ErRjAm3p127YMfWFf0O+xm15icbeaNU8n5YYW3wvJ7lFAedlUVmwFdpMX9p0wIFA9P 62zh0UNdnCAhM0ChB7L0Li2sd899Tu0m+oAWV8mg= From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, stable@vger.kernel.org, David Jeffery <djeffery@redhat.com>, Xiao Ni <xni@redhat.com>, Song Liu <songliubraving@fb.com>, Jack Wang <jinpu.wang@cloud.ionos.com> Subject: [PATCH 4.19 36/38] md: Set prev_flush_start and flush_bio in an atomic way Date: Mon, 8 Feb 2021 16:01:23 +0100 Message-Id: <20210208145807.613541970@linuxfoundation.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210208145806.141056364@linuxfoundation.org> References: <20210208145806.141056364@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: <stable.vger.kernel.org> X-Mailing-List: stable@vger.kernel.org |
Series |
None
|
expand
|
--- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -474,8 +474,10 @@ static void md_submit_flush_data(struct * could wait for this and below md_handle_request could wait for those * bios because of suspend check */ + spin_lock_irq(&mddev->lock); mddev->last_flush = mddev->start_flush; mddev->flush_bio = NULL; + spin_unlock_irq(&mddev->lock); wake_up(&mddev->sb_wait); if (bio->bi_iter.bi_size == 0) {