Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752979AbdFNPQB (ORCPT ); Wed, 14 Jun 2017 11:16:01 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46479 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752948AbdFNPP4 (ORCPT ); Wed, 14 Jun 2017 11:15:56 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com C313AC056791 Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=dhowells@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com C313AC056791 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 Subject: [PATCH 03/27] VFS: Make get_mnt_ns() return the namespace [ver #5] From: David Howells To: mszeredi@redhat.com, viro@zeniv.linux.org.uk Cc: linux-nfs@vger.kernel.org, jlayton@redhat.com, linux-kernel@vger.kernel.org, dhowells@redhat.com, linux-security-module@vger.kernel.org, linux-fsdevel@vger.kernel.org Date: Wed, 14 Jun 2017 16:15:42 +0100 Message-ID: <149745334260.10897.8377331388521502715.stgit@warthog.procyon.org.uk> In-Reply-To: <149745330648.10897.9605870130502083184.stgit@warthog.procyon.org.uk> References: <149745330648.10897.9605870130502083184.stgit@warthog.procyon.org.uk> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Wed, 14 Jun 2017 15:15:46 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 672 Lines: 25 Make get_mnt_ns() return the namespace it got a ref on for consistency with other namespace ref getting functions. Signed-off-by: David Howells --- fs/mount.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/mount.h b/fs/mount.h index bf1fda6eed8f..02ef292a77d7 100644 --- a/fs/mount.h +++ b/fs/mount.h @@ -108,9 +108,10 @@ static inline void detach_mounts(struct dentry *dentry) __detach_mounts(dentry); } -static inline void get_mnt_ns(struct mnt_namespace *ns) +static inline struct mnt_namespace *get_mnt_ns(struct mnt_namespace *ns) { atomic_inc(&ns->count); + return ns; } extern seqlock_t mount_lock;