Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp138563imm; Tue, 18 Sep 2018 18:26:56 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZRgJMgXItyZ+vSQ9siFEGldPLgWlQkN21AZDMJgudhyivJQKR+/mHqpLF32jpSGDXlHaJ+ X-Received: by 2002:a17:902:4324:: with SMTP id i33-v6mr31083104pld.43.1537320415949; Tue, 18 Sep 2018 18:26:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537320415; cv=none; d=google.com; s=arc-20160816; b=UsTbBEVmQqSwu0NIcz7yfLWK+fiBnwUUUisJ5HJNTasRr2J6m0KuJpIoOs0pInmx1e zLN6nOB+t8vC78oaDgVTkFVYqyWZFm+jvwke56xCu4EXBqdD1tJ5sL7OT84DpPPSI+YR 6J4gF3vH2RzABJgMmx6Jr0tNv0B1VdC9ovJHgh8KsgrffS+tNy+wg8/SoJsDG/kU7TDB jEzUeOqXxb/XkOYIEvax2ID8aBJ9I4vBXnLzAF2LaOpShjeugmdzJIIRQjn2Mc7qqrgz Khm3kQ2kgfj8TBtedNwwAHkzuwuOHKBVUBTc69jDyQmA+Yb2gBUJpVGjFB7fxrmkzF52 Mb0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=z6+AjDH6aZ2h7HSaXLPdSATHosxEzlGYsgLIovgJgqM=; b=MRmO1HxYkQjHomtiDsERAoYvlBhWU3jQkKx8I73wC9tbhNclGeLTNiB5JFJrhITQHB 6AqhkDqhir3jfBP9Yo+btYd6iXBiIN5gxtK0hyWlX5HlPuEADb3iU10rWp12yVOSGMw8 +n8/YM/GxXmE7ArjR+avYomzEU0Egb4wmH6nJOQCiP7YQ296RRmFJnSjstH5xMQUqiMv RYwhCQnWMe3OZHn8a8x4C+tb0c9AfzoD9/jx7lLhcwqPWrsn/4m6xaesUmiWytC08qae QE9o/tDSU9Ppiaro9FuTM+VljggpnYQmbJ27DgB3LTBlHbfd60co4SlTrTwwPiHHyfvh juxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=rHje7TCz; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 14-v6si21145684plb.230.2018.09.18.18.26.40; Tue, 18 Sep 2018 18:26:55 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=rHje7TCz; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730772AbeISHBt (ORCPT + 99 others); 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-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