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=-2.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_MUTT 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 182D6ECE561 for ; Wed, 19 Sep 2018 01:26:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AA231214DD for ; Wed, 19 Sep 2018 01:26:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="rHje7TCz" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AA231214DD Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730789AbeISHBt (ORCPT ); Wed, 19 Sep 2018 03:01:49 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:42241 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726887AbeISHBt (ORCPT ); Wed, 19 Sep 2018 03:01:49 -0400 Received: by mail-pg1-f196.google.com with SMTP id y4-v6so1883965pgp.9; Tue, 18 Sep 2018 18:26:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=z6+AjDH6aZ2h7HSaXLPdSATHosxEzlGYsgLIovgJgqM=; b=rHje7TCzYgR1RiMyIosxJU4HlDuUWwahv8t9nYjgARdoKy7S3GfX0xke6qITuJnNBu Rw1W+4CU1mT/rU94e3BtuUBBE27KKel6kOBNINC+WXAlIZXFBI+fSzgMz19R9cC/U8hG 5XlkbV4YTCB0PRdq/Ff1ITRLcPnEmUw6VYHWOO03cQFvTVM3h0l14suWPz8dG/pmTihu oxPY+MrHxgpNCNxrWOsCU8aE2WSAhtgSm6yjwRIGuF0Fz6XW4QiP/QSF0kIX6ZHM6h6S IkxYNb4pNSNMH3fGu+Cg09hRIDajN7VFbsK7QOzCq16mEd6AfJIdSnQpQpeGbJrVQUWQ rSAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=z6+AjDH6aZ2h7HSaXLPdSATHosxEzlGYsgLIovgJgqM=; b=j+tDLvIK/SewIZvy+p2Eb54VMilunsxUDocE/1RozT/RaIqYiTnsZyaoJKD0mRBzku szJ+ma2yN/ef0LEpPhoAd+R52Y7Ukggd2MHsxLY0NkAPW5nMDfG3EVsBgdDxJEQbv+FQ iuiFwOTSeu0yBJHn1kURdaropbJ4R/CQ8woVogWaDoDWPwra95jZDe+WBxigRiax2+UT Kh4W9w+fvJlwf6zKvGRDC8Nwv7+WzKyz5NJqZGgjvo8KiCSgGvCLw8RunemotKpwToK2 hog2lkAn0KCX3AX2DtbFK2UpPT9XX8YyRLcKMrd0k4FEXLl+9FonwrsEPtYI/hrL+9OI RI2Q== X-Gm-Message-State: APzg51CHQlC9/tYSGnuRjgFa5DuGC1GHaGEosFwHAk44uzJa+5PtFPmh dTtZZen+mBJ9xlfla8gpZ9M= X-Google-Smtp-Source: ANB0Vdal4WFp4SQKjqOHHmIXqumZAL5L7SEsUJ6b/uHgb9Bx6Bu+72u81uphj86evR5bTk2mZSCzfA== X-Received: by 2002:aa7:83cd:: with SMTP id j13-v6mr33171191pfn.236.1537320390125; Tue, 18 Sep 2018 18:26:30 -0700 (PDT) Received: from localhost ([175.223.11.230]) by smtp.gmail.com with ESMTPSA id y128-v6sm26864554pfb.56.2018.09.18.18.26.28 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Sep 2018 18:26:28 -0700 (PDT) Date: Wed, 19 Sep 2018 10:26:26 +0900 From: Sergey Senozhatsky To: Guenter Roeck Cc: David Howells , viro@zeniv.linux.org.uk, torvalds@linux-foundation.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Steven Rostedt , Sergey Senozhatsky Subject: Re: [PATCH 14/33] vfs: Implement a filesystem superblock creation/configuration context [ver #11] Message-ID: <20180919012626.GA482@jagdpanzerIV> References: <20180911220743.GA13208@roeck-us.net> <20180911174641.GA15149@roeck-us.net> <153313703562.13253.5766498657900728120.stgit@warthog.procyon.org.uk> <153313714181.13253.304098108512966976.stgit@warthog.procyon.org.uk> <27113.1536702746@warthog.procyon.org.uk> <32382.1536707855@warthog.procyon.org.uk> <20180911235403.GA10107@roeck-us.net> <20180918090722.GA463@jagdpanzerIV> <80eb1ec0-7b61-debe-9e93-0176d3e2c76a@roeck-us.net> <20180919011236.GA407@jagdpanzerIV> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180919011236.GA407@jagdpanzerIV> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On (09/19/18 10:12), Sergey Senozhatsky wrote: > On (09/18/18 07:06), Guenter Roeck wrote: > > > So the check either better be > > > > > > if (fc->ops && fc->ops->reconfigure) > > > > > > > Since there are multiple instances of fs_context where fc->ops isn't set, > > this check would be needed wherever fc->ops is dereferenced. > > Right. If fc is always guaranteed to be properly zeroed-out. This is > true for kzalloc-ed fc's, but not necessarily so in any other case. What I mean was something like this void foo(void) { struct fs_context fc; fc.purpose = ...; fc.fs_type = ...; fc.root = ...; fc.sb_flags = ...; reconfigure_super(&fc); } -ss