From mboxrd@z Thu Jan 1 00:00:00 1970 From: Al Viro Subject: Re: [PATCH 19/18] Unexport do_add_mount() and add in follow_automount(), not ->d_automount() Date: Fri, 14 Jan 2011 17:56:48 +0000 Message-ID: <20110114175648.GH19804@ZenIV.linux.org.uk> References: <20110114154652.GD19804@ZenIV.linux.org.uk> <20110114070224.GB19804@ZenIV.linux.org.uk> <20110113215359.19406.37232.stgit@warthog.procyon.org.uk> <2443.1295005428@redhat.com> <6672.1295025969@redhat.com> <20110114174340.GG19804@ZenIV.linux.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: raven@themaw.net, npiggin@kernel.dk, autofs@linux.kernel.org, linux-fsdevel@vger.kernel.org, Linus Torvalds To: David Howells Return-path: Received: from zeniv.linux.org.uk ([195.92.253.2]:35140 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752335Ab1ANR4z (ORCPT ); Fri, 14 Jan 2011 12:56:55 -0500 Content-Disposition: inline In-Reply-To: <20110114174340.GG19804@ZenIV.linux.org.uk> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: BTW, speaking of mntput_long(): I really hate that API. It's asking for subtle leaks - use mntget_long() in pair with mntput() and you are fucked. Worse, these suckers are created with long reference now, so any code that used to use mntput() to kill a cloned/freshly created vfsmount got silently b0rken. A quick look already caught one such case - fs/nfsctl.c do_open() uses mntput() in pair with do_kern_mount(), which leads to longrefs left at 1. Rationale for that mess, please...