From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from zeniv.linux.org.uk ([195.92.253.2]:42796 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030721AbeEYXx1 (ORCPT ); Fri, 25 May 2018 19:53:27 -0400 Received: from viro by ZenIV.linux.org.uk with local (Exim 4.87 #1 (Red Hat Linux)) id 1fMMWU-0002U5-KQ for linux-fsdevel@vger.kernel.org; Fri, 25 May 2018 23:53:26 +0000 Date: Sat, 26 May 2018 00:53:26 +0100 From: Al Viro To: linux-fsdevel@vger.kernel.org Subject: [RFC][PATCHES] reducing d_add() use, part 2 Message-ID: <20180525235326.GJ30522@ZenIV.linux.org.uk> References: <20180513212612.GV30522@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180513212612.GV30522@ZenIV.linux.org.uk> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Sun, May 13, 2018 at 10:26:12PM +0100, Al Viro wrote: > A lot of d_add() uses are in ->lookup() instances; > those really should be d_splice_alias() - that's mandatory > for anything exported (and we'd seen people not bothering > to convert when adding exports/open-by-fhandle support) *and* > it's not costlier than d_add() anyway, in all cases when > d_add() wouldn't have caused instant breakage. > > What's more, d_splice_alias() makes for simpler life > in callers - it does the right thing when given ERR_PTR(), > which simplifies the logics in quite a few ->lookup() instances. > > There are trickier cases, but a bunch of those call > sites are completely straightforward. See followups, or > vfs.git#work.lookup Continuation of the series - more simple cases: openpromfs: switch to d_splice_alias() orangefs_lookup: simplify omfs_lookup(): report IO errors, use d_splice_alias() hfs: use d_splice_alias() hfs: don't allow mounting over .../rsrc hfsplus: switch to d_splice_alias() ncp_lookup(): use d_splice_alias() 9p: unify paths in v9fs_vfs_lookup() cifs_lookup(): cifs_get_inode_...() never returns 0 with *inode left NULL cifs_lookup(): switch to d_splice_alias()