Return-Path: Received: from mx1.redhat.com ([209.132.183.28]:58220 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751763AbdEJIFV (ORCPT ); Wed, 10 May 2017 04:05:21 -0400 From: David Howells In-Reply-To: References: <149382747487.30481.15428192741961545429.stgit@warthog.procyon.org.uk> <149382749941.30481.11685229083280551867.stgit@warthog.procyon.org.uk> <10943.1494284264@warthog.procyon.org.uk> <15762.1494322915@warthog.procyon.org.uk> <1494355884.2659.18.camel@redhat.com> To: Miklos Szeredi Cc: dhowells@redhat.com, Jeff Layton , viro , linux-fsdevel , linux-nfs@vger.kernel.org, lkml Subject: Re: [PATCH 3/9] VFS: Introduce a mount context MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Date: Wed, 10 May 2017 09:05:18 +0100 Message-ID: <30059.1494403518@warthog.procyon.org.uk> Sender: linux-nfs-owner@vger.kernel.org List-ID: Miklos Szeredi wrote: > And the static string thing that David implemented is also a very good > idea, IMO. There is an issue with it: it's fine as long as you keep a ref on the module that generated it or clear all strings as part of module removal (which the mount context in this patchset does). With the NFS mount context I did, I have to keep a ref on the NFS protocol module as well as the NFS filesystem module. I'm tempted to make it conditionally copy the string using kvasprintf_const() - which would also permit format substitution. David