Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3868478pxb; Tue, 17 Nov 2020 05:48:39 -0800 (PST) X-Google-Smtp-Source: ABdhPJzCUYIDeDgN2STve2wOnj7tW4Zx/giauQHpk7tO99qO8/drimQJ9T+NjrQcEL4b+87yrIT8 X-Received: by 2002:a17:906:11c9:: with SMTP id o9mr3683467eja.279.1605620919002; Tue, 17 Nov 2020 05:48:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605620918; cv=none; d=google.com; s=arc-20160816; b=hffb+dcTcPqKK1l11zuaXziVHaaUmk8GHi4cpeFKC7EfpiTEjK3pqgrjCZxaucHrTM fqCvScCu/nZUroTvhO4kHwTvb91IbNIM0VR7UvqBOxxKL0TgCT9OKdvOk6ie0t8sg1nn 6wVRyi6jh5/iY2EnTOhXHuOODnza1OYLcQR7rQVXEarwFmZXWH3REgGZF400cuWVmjRv IoyUWN38yYbP8l3vEZwKMZokVv/CYon+sja9Tzq7XdoqUZpyyw0GsK0r0Y5r0kwZlV/e mlOgo2mXFUmO2dOBU59ygnu0lKYjYuRIWbW/0a0ckSPmFCE9dr5051WeE8v+SSkDsfsN tScQ== 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=u2qxqKUrQYLY4a9TMs6/xc5rpWIwH8lCLZLreR9IiTw=; b=XmC+qLw7idxOnaKpjkNd2xlmMdyu/DNy2gmUSeMAbDCo4n6QmRETuupHLYtY02KLWT HQcBUZTQ4lqZgjUzDyqsbPzoF3LTAcD+uWoc9Az33YIbktdyWJVnP9iBKHiSAC5JUA/E LayN9n/hvTuEWnNnP/u0jBoY+fiJcufOV48pw9VIMA27xzxT+bPoMkeZsOLJuA/69z8X o/EgSaYOhJlaie34hXBbHvfYgezGa21SyppzW5ch+v/E6ZmgJyJSDo+VASepHZ9m+4Wm IxyZ/dwNbkjUXgKNf5t14E9f8+kugWh7wasOovpOLlqh3sJyhagwA4pGVNglQ8vNKE3g sSBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=po1QfH+o; 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 v10si13937910ede.131.2020.11.17.05.48.16; Tue, 17 Nov 2020 05:48:38 -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=po1QfH+o; 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 S1732726AbgKQNpa (ORCPT + 99 others); Tue, 17 Nov 2020 08:45:30 -0500 Received: from mail.kernel.org ([198.145.29.99]:51362 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732736AbgKQNje (ORCPT ); Tue, 17 Nov 2020 08:39:34 -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 37FA724686; Tue, 17 Nov 2020 13:39:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1605620373; bh=a++5pX6LYbrmR0abOiTDtqu6oEjVo+MRQja8dm5Y104=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=po1QfH+oawiFXwSkLMkFPd9MQjgSIWTgQkiEg6hhOWrNR2Gh5KRqXSt76SUlQ4ESt yNcOe8XMORtdF0DSkA+eC5KTXYBmEj/YIkywIlOSCoAyMEfZuXYJD1twaLMmBkc8vT fLLxak7QMA7L6Gn+sSOH9/h+pF+yk6jJuUpCxyAU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Christoph Hellwig , Petr Vorel , Jens Axboe Subject: [PATCH 5.9 197/255] block: add a return value to set_capacity_revalidate_and_notify Date: Tue, 17 Nov 2020 14:05:37 +0100 Message-Id: <20201117122148.517812147@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 commit 7e890c37c25c7cbca37ff0ab292873d8146e713b upstream. Return if the function ended up sending an uevent or not. Cc: stable@vger.kernel.org # v5.9 Signed-off-by: Christoph Hellwig Reviewed-by: Petr Vorel Signed-off-by: Jens Axboe Signed-off-by: Greg Kroah-Hartman --- block/genhd.c | 5 ++++- include/linux/genhd.h | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) --- a/block/genhd.c +++ b/block/genhd.c @@ -49,7 +49,7 @@ static void disk_release_events(struct g * Set disk capacity and notify if the size is not currently * zero and will not be set to zero */ -void set_capacity_revalidate_and_notify(struct gendisk *disk, sector_t size, +bool set_capacity_revalidate_and_notify(struct gendisk *disk, sector_t size, bool revalidate) { sector_t capacity = get_capacity(disk); @@ -63,7 +63,10 @@ void set_capacity_revalidate_and_notify( char *envp[] = { "RESIZE=1", NULL }; kobject_uevent_env(&disk_to_dev(disk)->kobj, KOBJ_CHANGE, envp); + return true; } + + return false; } EXPORT_SYMBOL_GPL(set_capacity_revalidate_and_notify); --- a/include/linux/genhd.h +++ b/include/linux/genhd.h @@ -315,7 +315,7 @@ static inline int get_disk_ro(struct gen extern void disk_block_events(struct gendisk *disk); extern void disk_unblock_events(struct gendisk *disk); extern void disk_flush_events(struct gendisk *disk, unsigned int mask); -extern void set_capacity_revalidate_and_notify(struct gendisk *disk, +extern bool set_capacity_revalidate_and_notify(struct gendisk *disk, sector_t size, bool revalidate); extern unsigned int disk_clear_events(struct gendisk *disk, unsigned int mask);