Received: by 2002:ac0:a679:0:0:0:0:0 with SMTP id p54csp403480imp; Wed, 20 Feb 2019 02:18:19 -0800 (PST) X-Google-Smtp-Source: AHgI3IaOpbhXgVHGJLk9XN1ZVyoHlXmfuWFwpGAQfmDa7Co8/wF+LZ60W/OThtG2EdJV/euzWhdI X-Received: by 2002:a63:4346:: with SMTP id q67mr27661347pga.92.1550657899673; Wed, 20 Feb 2019 02:18:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550657899; cv=none; d=google.com; s=arc-20160816; b=XU9RhYVqmBtPPPXxmWp5IM3Q9RXtge/Z8j5TEgQjQp+hvtfj/p6U3CqPfP8Xax5I4E wXNhPJGtpRVvbj18wzdYtYlCSDruvp+HVKWJ6kuZHzO+MAq+J0GvewIF8GQk2OoI4Tos 4zrrM2JxEcJi8Drg2xV5gq2xGprefWeO9CZKk19sLde9c7JwDnH2Oxxoo8L4uC9/3i02 CFan3fLZi9j40xCvsvRUwlN4qPR5JGVBNMQ6j11e6l6J0QjYvXF3/LqaF3QFzmXsTBY4 aEXRS6r8qQhpL5+5BkO8lhYGAVpuQPMfhz0g4VrfxVfo0GVWeoxHsNDJrYP4fbtqvRpE gdrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=fiS+CADPCGZUs9yGDRtbbrHgrhQGCE1F+ND5MFrVSOY=; b=0MkuaUqw9G4zQ+8v26ODKd6DtUtdt/8PPsE4xofiU5+bqxn+j/Qp21LpkpnD58aRzG cYUsNO7/tAAQzBASXY3rASvpA3899e2qca5xXR9QB9Ch4oLkSKfnABc8ZO07gLBUxF6R LwQUUIeRbD+db2nq8lI787DkAqRSfdqBw7xahQzcAI1L48eH7uS9UaLr4vFvYUGdfb59 OaVRFdiHb3Xdz8Lr9TbcWUknjaRnye6UNjniOkbTdo/oR8Tf/WI9b8YPaS/QzFo/PeIP obo0BgFYNVUSprUGCE7dOloNsTKNoE8vCQctDGDkNZdhKaBD2EeF0LcP5y2pPS04inB5 x/qw== 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 v6si1696538plo.129.2019.02.20.02.18.04; Wed, 20 Feb 2019 02:18:19 -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 S1727401AbfBTKRb (ORCPT + 99 others); Wed, 20 Feb 2019 05:17:31 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:4238 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726760AbfBTKR1 (ORCPT ); Wed, 20 Feb 2019 05:17:27 -0500 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 4EC6875236298C4075B6; Wed, 20 Feb 2019 18:17:25 +0800 (CST) Received: from huawei.com (10.90.53.225) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.408.0; Wed, 20 Feb 2019 18:17:15 +0800 From: Hou Tao To: CC: David Woodhouse , Richard Weinberger , , Subject: [PATCH 0/2] jffs2: fixes for file creation failed halfway Date: Wed, 20 Feb 2019 18:21:31 +0800 Message-ID: <20190220102133.7878-1-houtao1@huawei.com> X-Mailer: git-send-email 2.16.2.dirty MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.90.53.225] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, There are the fixes for file creation which failed halfway, the first one is used to reclaim flash spaces had been used by the inode, and the second one fixes a BUG assertion in jffs2_do_read_inode(). These two problems can be reproduced by concurrently creating files until no space is left, and then removing these files, and repeating. Comments are welcome. Hou Hou Tao (2): jffs2: reset pino_nlink to 0 when inode creation failed jffs2: handle INO_STATE_CLEARING in jffs2_do_read_inode() fs/jffs2/dir.c | 28 ++++++++++++++++++++++++---- fs/jffs2/readinode.c | 1 + 2 files changed, 25 insertions(+), 4 deletions(-) -- 2.16.2.dirty