From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from zeniv.linux.org.uk (zeniv.linux.org.uk [62.89.141.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3C8AE34845D; Tue, 11 Nov 2025 06:55:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=62.89.141.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762844136; cv=none; b=EUOJGpsWBZzcZEoM/JZTepwTXOD3UoGZhjJBjp+CBXMd80wr5WnYykRNyCMQWJbuTidB3lQxxvUcgFAUn6s9Q76qXYIoVJgGZI08OGlOOhFiX8H0dHUPMXHEiKscfOcC0fFgB4eR5pkJlCVBG1IuYD/oNXTgyTQhxuQBoh48q24= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762844136; c=relaxed/simple; bh=zPYbbdJMbimCH8CGuafAZf5bHfgge+LaaShYJQxoDwY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=faPvxBDIc58xr2wwvx4UM5hwHR1PZpkYKi+7WTdgdw1hplz8LdTLXsm4VNF3115iwc5r+oMy0UPc7AdP6Fx1dCHpJx4IIOW2S4K6SiaXzu9K9LcRYdT2qevw5nl7a3wyHIK/NePqfz5tlgKQh8bIzZqCVpbRuVEP9qV/at+k/go= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zeniv.linux.org.uk; spf=none smtp.mailfrom=ftp.linux.org.uk; dkim=pass (2048-bit key) header.d=linux.org.uk header.i=@linux.org.uk header.b=ELoJMPPp; arc=none smtp.client-ip=62.89.141.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zeniv.linux.org.uk Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=ftp.linux.org.uk Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linux.org.uk header.i=@linux.org.uk header.b="ELoJMPPp" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=linux.org.uk; s=zeniv-20220401; h=Sender:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description; bh=sU0Rwyb1f70hxWqGLaDrX9gfHmhzhxjXEuqfS3xyBnk=; b=ELoJMPPpp0RfTLnDX6xsMZs0A+ kTdsC4LcVi2QtgIkzPaEUU262+vbuyredIqr924NLjnE3vbpYyu4H0UiNn1inw1q1h65TZcyPQWOC N6C4kHzsz00rAJNHx5NnqAknPASR8POOss9PAaaS6CsdKDaE0FNBiGfXEJerM7AfzqAAW+8dCs5rs c3bMG7dOe2GM6A5Jy+8FqyD42G/CdZ7KtCoH6yO6yEDngTSX6rWPvyYfuDLjGCnoWHHz1tMr8YMky LdiyFUtb4LuJjFmwmndVlzgqap6D2+T/ImMFwJ5qyfA0pOz2TL/GaMMh/Ivw6rkahhsmiEIZsfiRq Cw/0btZg==; Received: from viro by zeniv.linux.org.uk with local (Exim 4.98.2 #2 (Red Hat Linux)) id 1vIiHq-0000000BxFT-2h81; Tue, 11 Nov 2025 06:55:30 +0000 From: Al Viro To: linux-fsdevel@vger.kernel.org Cc: torvalds@linux-foundation.org, brauner@kernel.org, jack@suse.cz, raven@themaw.net, miklos@szeredi.hu, neil@brown.name, a.hindborg@kernel.org, linux-mm@kvack.org, linux-efi@vger.kernel.org, ocfs2-devel@lists.linux.dev, kees@kernel.org, rostedt@goodmis.org, gregkh@linuxfoundation.org, linux-usb@vger.kernel.org, paul@paul-moore.com, casey@schaufler-ca.com, linuxppc-dev@lists.ozlabs.org, john.johansen@canonical.com, selinux@vger.kernel.org, borntraeger@linux.ibm.com, bpf@vger.kernel.org Subject: [PATCH v3 43/50] convert hypfs Date: Tue, 11 Nov 2025 06:55:12 +0000 Message-ID: <20251111065520.2847791-44-viro@zeniv.linux.org.uk> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20251111065520.2847791-1-viro@zeniv.linux.org.uk> References: <20251111065520.2847791-1-viro@zeniv.linux.org.uk> Precedence: bulk X-Mailing-List: bpf@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: Al Viro just have hypfs_create_file() do the usual simple_start_creating()/ d_make_persistent()/simple_done_creating() and that's it Signed-off-by: Al Viro --- arch/s390/hypfs/inode.c | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/arch/s390/hypfs/inode.c b/arch/s390/hypfs/inode.c index 6a80ab2692be..98952543d593 100644 --- a/arch/s390/hypfs/inode.c +++ b/arch/s390/hypfs/inode.c @@ -311,7 +311,7 @@ static void hypfs_kill_super(struct super_block *sb) struct hypfs_sb_info *sb_info = sb->s_fs_info; hypfs_last_dentry = NULL; - kill_litter_super(sb); + kill_anon_super(sb); kfree(sb_info); } @@ -321,17 +321,13 @@ static struct dentry *hypfs_create_file(struct dentry *parent, const char *name, struct dentry *dentry; struct inode *inode; - inode_lock(d_inode(parent)); - dentry = lookup_noperm(&QSTR(name), parent); - if (IS_ERR(dentry)) { - dentry = ERR_PTR(-ENOMEM); - goto fail; - } + dentry = simple_start_creating(parent, name); + if (IS_ERR(dentry)) + return ERR_PTR(-ENOMEM); inode = hypfs_make_inode(parent->d_sb, mode); if (!inode) { - dput(dentry); - dentry = ERR_PTR(-ENOMEM); - goto fail; + simple_done_creating(dentry); + return ERR_PTR(-ENOMEM); } if (S_ISREG(mode)) { inode->i_fop = &hypfs_file_ops; @@ -346,10 +342,9 @@ static struct dentry *hypfs_create_file(struct dentry *parent, const char *name, } else BUG(); inode->i_private = data; - d_instantiate(dentry, inode); -fail: - inode_unlock(d_inode(parent)); - return dentry; + d_make_persistent(dentry, inode); + simple_done_creating(dentry); + return dentry; // borrowed } struct dentry *hypfs_mkdir(struct dentry *parent, const char *name) -- 2.47.3