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.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,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 DC9A2C282E5 for ; Sat, 25 May 2019 23:08:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BE83520856 for ; Sat, 25 May 2019 23:08:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727511AbfEYXIy (ORCPT ); Sat, 25 May 2019 19:08:54 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:58920 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725989AbfEYXIy (ORCPT ); Sat, 25 May 2019 19:08:54 -0400 Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92 #3 (Red Hat Linux)) id 1hUfmQ-0007tt-IP; Sat, 25 May 2019 23:08:46 +0000 Date: Sun, 26 May 2019 00:08:46 +0100 From: Al Viro To: David Howells Cc: trond.myklebust@hammerspace.com, anna.schumaker@netapp.com, linux-nfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 23/23] NFS: Add fs_context support. Message-ID: <20190525230846.GP17978@ZenIV.linux.org.uk> References: <155862813755.26654.563679411147031501.stgit@warthog.procyon.org.uk> <155862834550.26654.17230477291010963688.stgit@warthog.procyon.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <155862834550.26654.17230477291010963688.stgit@warthog.procyon.org.uk> User-Agent: Mutt/1.11.3 (2019-02-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 23, 2019 at 05:19:05PM +0100, David Howells wrote: > out_no_data: > - dfprintk(MOUNT, "NFS: mount program didn't pass any mount data\n"); > - return -EINVAL; > + if (fc->purpose == FS_CONTEXT_FOR_RECONFIGURE) { > + ctx->skip_reconfig_option_check = true; > + return 0; > + } That really ought to be if (fc->root) { /* remount */ ctx->skip_reconfig_option_check = true; return 0; } and similar in the v4 counterpart. fc->purpose is a bad idea; it is possible to get rid of it. Frankly, I'm tempted to add static inline bool is_remount_fc(struct fs_context *fc) { return fc->root != NULL; } and just use that in such places...