Received: by 10.223.185.116 with SMTP id b49csp5498821wrg; Wed, 7 Mar 2018 12:51:43 -0800 (PST) X-Google-Smtp-Source: AG47ELvMryAnzBqZDDUWbxwoQg4j1VcjGkzAiSNdT0+PXbTFBD3AjW6IZ5Enw0Uh9X/uhZbrW+1o X-Received: by 2002:a17:902:b2c6:: with SMTP id x6-v6mr21432976plw.285.1520455903520; Wed, 07 Mar 2018 12:51:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520455903; cv=none; d=google.com; s=arc-20160816; b=O1OAUPA18l9emXP6TOg4Pbnt6Q+DO2DwvGLjyskOrrNNTDKAgBqzfbmNCeT75mTRJ5 jIZoYJSiCkNXDbP9sL3twgqobqV+coY2Mo1azespJwxxb/8JsarTdFWeACSAZXgXVV5/ ejpweSFsxkEpCR3PUer/fIBNjKhNPRZF3NmnPokxSu5NvZdx7BJAKed14YSIyBz6kSMf nqKOk8Z6G8HhnTOsvLU9t7gswgvKImC5wyjl1vQVthOfHsqD5pPyvc//5GaoqdSwMtDY BiVOgymRMfHCRJq3kTqQ55CjjLKC7hhtJYvXXWc1dtPHsG6o4XS4e2C1JB5LCrBtda/I MxXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=JAvQC81HXDYeNLm3p2RgVWH/N1HKJyMGLRpakMQ8Am0=; b=tAjsvPRta4M5bxiHbnDenzKKKC5eN0xz1roHi8nLgE0LGkd76VsEjwY5erNgN7o+5A G3QkEkS+vwlU2gCp0emetg4WzwmPFdhFRzciqssCQJZ/JHQJx+Qj3b/c0DV6XSrYJYWT ajEezczbfduy6hqUHrb+HpuUBKpF493gjTN+06aSqtYjxBtA6M6Oi5bukija9XyaMV9p oWu1rbY0YIcaRbvklayGk2b0kP21l5+bwZLGZJyop3RHEg0d1WKiIuFr6FWshlkSu7+a LId1Zo4O9n4qQQTL9fRtz+0BR6q+3IVBMlHFwpfqJXnZQPYlx9nW5BVB8FeZIxthT5gr kMiA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b11si11876165pgr.612.2018.03.07.12.51.28; Wed, 07 Mar 2018 12:51:43 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934806AbeCGUuk (ORCPT + 99 others); Wed, 7 Mar 2018 15:50:40 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:40608 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934362AbeCGTkd (ORCPT ); Wed, 7 Mar 2018 14:40:33 -0500 Received: from localhost (unknown [185.236.200.248]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 4A1AFF98; Wed, 7 Mar 2018 19:40:32 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Omar Sandoval , Christoph Hellwig , Jiufei Xue , Jens Axboe Subject: [PATCH 4.15 029/122] block: fix the count of PGPGOUT for WRITE_SAME Date: Wed, 7 Mar 2018 11:37:21 -0800 Message-Id: <20180307191733.475730582@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180307191729.190879024@linuxfoundation.org> References: <20180307191729.190879024@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Jiufei Xue commit 7c5a0dcf557c6511a61e092ba887de28882fe857 upstream. The vm counters is counted in sectors, so we should do the conversation in submit_bio. Fixes: 74d46992e0d9 ("block: replace bi_bdev with a gendisk pointer and partitions index") Cc: stable@vger.kernel.org Reviewed-by: Omar Sandoval Reviewed-by: Christoph Hellwig Signed-off-by: Jiufei Xue Signed-off-by: Jens Axboe Signed-off-by: Greg Kroah-Hartman --- block/blk-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/block/blk-core.c +++ b/block/blk-core.c @@ -2401,7 +2401,7 @@ blk_qc_t submit_bio(struct bio *bio) unsigned int count; if (unlikely(bio_op(bio) == REQ_OP_WRITE_SAME)) - count = queue_logical_block_size(bio->bi_disk->queue); + count = queue_logical_block_size(bio->bi_disk->queue) >> 9; else count = bio_sectors(bio);