From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C15A2CA9EAF for ; Mon, 21 Oct 2019 14:04:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9D02F2084C for ; Mon, 21 Oct 2019 14:04:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728889AbfJUOEc (ORCPT ); Mon, 21 Oct 2019 10:04:32 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:48396 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727152AbfJUOEb (ORCPT ); Mon, 21 Oct 2019 10:04:31 -0400 Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1iMYIK-0004hs-Ug; Mon, 21 Oct 2019 14:04:25 +0000 Date: Mon, 21 Oct 2019 15:04:24 +0100 From: Al Viro To: David Howells Cc: Nicolas Pitre , Maxime Bizon , linux-fsdevel@vger.kernel.org Subject: Re: [PATCH] cramfs: fix usage on non-MTD device Message-ID: <20191021140424.GU26530@ZenIV.linux.org.uk> References: <18923.1571665539@warthog.procyon.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <18923.1571665539@warthog.procyon.org.uk> User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Mon, Oct 21, 2019 at 02:45:39PM +0100, David Howells wrote: > Nicolas Pitre wrote: > > > From: Maxime Bizon > > > > When both CONFIG_CRAMFS_MTD and CONFIG_CRAMFS_BLOCKDEV are enabled, if > > we fail to mount on MTD, we don't try on block device. > > > > Fixes: 74f78fc5ef43 ("vfs: Convert cramfs to use the new mount API") > > > > Signed-off-by: Maxime Bizon > > Signed-off-by: Nicolas Pitre > > Acked-by: David Howells FWIW, the thing that worries me here is the possibility of side effects on fs_context in case if fill_super fails really late... OTOH, cramfs one seems to be safe in that respect. OK, will apply, but that's fairly brittle and needs to be documented. If we *ever* grow non-trivial options parsing there, that'll be a serious landmine. If something gets transferred from fs_context into a superblock, which fails later in setup and takes that object with it, the second part (get_tree_bdev()) would be in trouble.