Return-Path: Received: from mail-eopbgr750057.outbound.protection.outlook.com ([40.107.75.57]:37216 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726426AbeLRO0D (ORCPT ); Tue, 18 Dec 2018 09:26:03 -0500 From: Wang Shilong To: "zhangyi (F)" , "linux-ext4@vger.kernel.org" CC: "tytso@mit.edu" , "adilger.kernel@dilger.ca" , "miaoxie@huawei.com" Subject: Re: [PATCH 1/2] ext4: fix race when setting the bitmap corrupted flag again Date: Tue, 18 Dec 2018 14:25:20 +0000 Message-ID: <0861E7C3-E642-464F-8987-B7094EFD1B2B@ddn.com> References: <1545134401-104523-1-git-send-email-yi.zhang@huawei.com> In-Reply-To: <1545134401-104523-1-git-send-email-yi.zhang@huawei.com> Content-Language: zh-CN Content-Type: text/plain; charset="utf-8" Content-ID: <3F6225A70C6D424AAF25259C434AA681@namprd19.prod.outlook.com> Content-Transfer-Encoding: base64 MIME-Version: 1.0 Sender: linux-ext4-owner@vger.kernel.org List-ID: SGksDQoNCu+7v+WcqCAyMDE4LzEyLzE4IOS4i+WNiDc6NTfvvIzigJx6aGFuZ3lpIChGKeKAnTx5 aS56aGFuZ0BodWF3ZWkuY29tPiDlhpnlhaU6DQoNCiAgICBDb21taXQgOWFmMGIzZDEyNTc3ICJl eHQ0OiBmaXggcmFjZSB3aGVuIHNldHRpbmcgdGhlIGJpdG1hcCBjb3JydXB0ZWQNCiAgICBmbGFn IiB3YW50IHRvIGZpeCByYWNlIGJldHdlZW4gc2V0dGluZyBpbm9kZS9ibG9jayBiaXRtYXAgY29y cnVwdGVkDQogICAgZmxhZyBhbmQgcmVkdWNpbmcgZnJlZSBncm91cCBpbm9kZXMvY2x1c3RlcnMg Y291bnRlciB0byBwcmV2ZW50DQogICAgbXVsdGlwbGUgZnJlZXMuIEJ1dCBleHQ0X3Rlc3RfYW5k X3NldF9iaXQoKSB3aWxsIGludm9rZQ0KICAgIF9fdGVzdF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