Received: by 2002:a17:90a:1609:0:0:0:0 with SMTP id n9csp5771985pja; Tue, 24 Mar 2020 15:09:39 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuP8T5e6w6nS6qdQYjAx4VX5Zp72VHMK9cqnaljwXutJrD3LIgRAfiDJm/Kvf6xcbFsA0oj X-Received: by 2002:a05:6830:1ae9:: with SMTP id c9mr200107otd.298.1585087779014; Tue, 24 Mar 2020 15:09:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585087779; cv=none; d=google.com; s=arc-20160816; b=YnG4neArVV6JAoGXUi2YA/m7idtKYGJRbeUJCtFWD7DEdGppuggEM8G2ATN88YYu5G 3vHL41Pa1DHq6bipollR245aJOBP8BkZvJdjzxoAwORr6imuhiKgEcV5runSaebJfARs Nu7pCzKzyGTrTxQ9MZhePe9hipoloNpMSHbSFG8elYiwV1en/GnZnaOq8K7FiLeI2RcD GL1uVScogGid4QIANcEs5XLLEIhQ8Zwcc4f9URiAmsQ2rZNVOm5TEOo3N+eTbwyHKfBV fQmmvnsbCOyD18LbJdPGd71m7QcsWHSKigKjgobfdE6+QiHl/LfeGgh8RVf8hQHG4PIL lmuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=YisqKjCNM1Y80Mj0f4mP2dK9GUcUjNI+ZCBNA+/xUqs=; b=fVUVpvqbZPr124/3QgXFEJopBBO1+kXUulVUk05+UYDwjGHL1jgPz9p+l6sSuj6Bkn n6/a/ZyAqNuH6wVgVsp39MJneaBUAVd8/9N01E1ok1Y0IDamiXJpPz7m69jd2jY+tjpI WEOWo/aMzDprPTSSAxyIlWAO4m1bb0W3U7Ip1q8roIyd4sN8VQXnvIQ+6eIKmj5CaOtt 0kLbu3eoKCpx/PKSlPrGhAblKCzGu3Vtp5AUFpE3uR1hAL2K3p4t+ZmaKABgngCzmNKM p31s4tmJ9DISfFAW4xt4v8MvhcPWe5jgfBS2K/Q0W2cB8Rt8dL4dsbyHxR1XqYBtALs6 uApA== 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 s27si10367216otg.229.2020.03.24.15.08.58; Tue, 24 Mar 2020 15:09:38 -0700 (PDT) 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 S1728385AbgCXWGY convert rfc822-to-8bit (ORCPT + 99 others); Tue, 24 Mar 2020 18:06:24 -0400 Received: from relay9-d.mail.gandi.net ([217.70.183.199]:34383 "EHLO relay9-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728184AbgCXWGY (ORCPT ); Tue, 24 Mar 2020 18:06:24 -0400 X-Originating-IP: 91.224.148.103 Received: from xps13 (unknown [91.224.148.103]) (Authenticated sender: miquel.raynal@bootlin.com) by relay9-d.mail.gandi.net (Postfix) with ESMTPSA id 0B774FF802; Tue, 24 Mar 2020 22:06:21 +0000 (UTC) Date: Tue, 24 Mar 2020 23:06:20 +0100 From: Miquel Raynal To: Xiaoming Ni Cc: , , , , , Subject: Re: [PATCH] mtd:Fix issue where write_cached_data() fails but write() still returns success Message-ID: <20200324230620.174db1a7@xps13> In-Reply-To: <1584674111-101462-1-git-send-email-nixiaoming@huawei.com> References: <1584674111-101462-1-git-send-email-nixiaoming@huawei.com> Organization: Bootlin X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; x86_64-pc-linux-gnu) 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 Hi Xiaoming, Xiaoming Ni wrote on Fri, 20 Mar 2020 11:15:11 +0800: > mtdblock_flush() > -->write_cached_data() > --->erase_write() > mtdblock: erase of region [0x40000, 0x20000] on "xxx" failed > > Because mtdblock_flush() always returns 0, > even if write_cached_data() fails and data is not written to the device, > syscall_write() still returns success I reworded a bit the commit log and also added a ' ' after 'mtd:' in the title when applying. Thanks, Miquèl