From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg1-f193.google.com ([209.85.215.193]:32792 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726887AbeISGr6 (ORCPT ); Wed, 19 Sep 2018 02:47:58 -0400 Date: Wed, 19 Sep 2018 10:12:36 +0900 From: Sergey Senozhatsky To: Guenter Roeck Cc: Sergey Senozhatsky , David Howells , viro@zeniv.linux.org.uk, torvalds@linux-foundation.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Steven Rostedt Subject: Re: [PATCH 14/33] vfs: Implement a filesystem superblock creation/configuration context [ver #11] Message-ID: <20180919011236.GA407@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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <80eb1ec0-7b61-debe-9e93-0176d3e2c76a@roeck-us.net> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: 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. -ss