From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752337AbdEJIFZ (ORCPT ); Wed, 10 May 2017 04:05:25 -0400 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 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com A9B96C04B32C Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=dhowells@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com A9B96C04B32C Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 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" Content-ID: <30058.1494403518.1@warthog.procyon.org.uk> Date: Wed, 10 May 2017 09:05:18 +0100 Message-ID: <30059.1494403518@warthog.procyon.org.uk> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Wed, 10 May 2017 08:05:20 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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