Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp7460007rdb; Wed, 3 Jan 2024 17:48:54 -0800 (PST) X-Google-Smtp-Source: AGHT+IEhSYQLwr/RIMpdrTAK68NOrvPPvtg4L1JA34bdFIZsiMxooAXkpuf68dscTn6DbFTo46/a X-Received: by 2002:ac8:5c47:0:b0:428:3d51:c2a6 with SMTP id j7-20020ac85c47000000b004283d51c2a6mr912876qtj.117.1704332934760; Wed, 03 Jan 2024 17:48:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704332934; cv=none; d=google.com; s=arc-20160816; b=bh+868oCwQSkqrlHW8Ua36F7re1+R+rvDbZubI6jl9sncAspZ0qa++ZaIZCnIruFbo yK57XNWrTmul22vjrpkmejwmqWEXgZeSeP4NJ/0PHNcPPZd6lQO2u/2iBzeZjLgvqfBG C7A3DZy9cIGIf9CVVIfDTWWZLUxoB97CD8AznubWVDwhomyexIYvpDvzUE/yH5pDWEIt 3F2b8w68E/typSBwqIVuV+0ZeSM9p2A+rvbv2t5iMXpD3A4YQ+yjUU4Opvc6g/+uwDAG KC4CNvWDxXgF8PSsdApcYN8ERv0Ee2X5Uky5jsrzRLY5Zz3Hyz8lvbJjQMG3j/+kkREr +rMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date:dkim-signature; bh=Z2pAVgWlAJ8tkGS/VnuzeBYZcCyen7flzxJt+0I1PG0=; fh=LVijBhQIFqKzwXXSERkvN96JucKU5xZhL1iTTTVYrKA=; b=pwwmvvb7pIQU7cv3eCe73yoGxBaVrIEQH9kjP5vWJZjry8Mt+I79Lwg0V+FpBqmeym czHd6QCEwu667FDFtvM40Uq35+RKX8i3cdrxGTlC8iVw32NNTUawDUyLF1dO77PCUfGp Nm60Z7jCKocRFVY7kcx6RyX0iz38PVJeMtsMFdEJ78uPSx73wxTgzv14bjIV+35SSwcB DXBPpapHoicE98cyLin4wrnRQw7BigG5MGvfQ/qbis4dAJ/2VuJ92vAId+i1mWgYLPOI nvKj84VFenpyGfEw2celTFM0fzzpsm2X7jEnJnYvuaH35qTXUuWhbu9Tm7TjWr9aEla2 KVLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.org.uk header.s=zeniv-20220401 header.b=csehxxbi; spf=pass (google.com: domain of linux-kernel+bounces-16186-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-16186-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zeniv.linux.org.uk Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id c5-20020ac85a85000000b004181bc4d5cfsi29333585qtc.642.2024.01.03.17.48.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jan 2024 17:48:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-16186-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.org.uk header.s=zeniv-20220401 header.b=csehxxbi; spf=pass (google.com: domain of linux-kernel+bounces-16186-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-16186-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zeniv.linux.org.uk Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 85C2C1C24B53 for ; Thu, 4 Jan 2024 01:48:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A76921FB4; Thu, 4 Jan 2024 01:48:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linux.org.uk header.i=@linux.org.uk header.b="csehxxbi" X-Original-To: linux-kernel@vger.kernel.org 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 75E201849; Thu, 4 Jan 2024 01:48:42 +0000 (UTC) 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 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=linux.org.uk; s=zeniv-20220401; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=Z2pAVgWlAJ8tkGS/VnuzeBYZcCyen7flzxJt+0I1PG0=; b=csehxxbiUXX1KIbA9ZMsrg6t3t TNCSY5LykujCNzDU9sYwdoJBtpx6su8fmxy90j7Xs2qfgdVR9xVfgZLMJ0D7ph0IslBS/1yRUCrm5 3leeJBsCIogosyQ0ui0YFC12kuIpfSgcnSPupGnuWcLxPxonHzoD5Jm8Z9faLB6Ru4cKZjJJLEc9k Wfpm0/YW6aNvf6vqkbzlC+aaf4iqNjRTm2LP0quWlICk2wZSceXVJ48y+RC4FleMomvlvdhdFSNZo B/oeZc6wHI9fvGDew9sRLEWj2DHc2lHyVkRYOwd5lZHDcX48FgyPgJJDLwHs2Sjqz9foy3syBtPrq 8tyb3j1g==; Received: from viro by zeniv.linux.org.uk with local (Exim 4.96 #2 (Red Hat Linux)) id 1rLCqb-0013HX-2t; Thu, 04 Jan 2024 01:48:38 +0000 Date: Thu, 4 Jan 2024 01:48:37 +0000 From: Al Viro To: Steven Rostedt Cc: LKML , Linux Trace Kernel , Masami Hiramatsu , Mathieu Desnoyers , Linus Torvalds , Christian Brauner , linux-fsdevel@vger.kernel.org, Greg Kroah-Hartman Subject: Re: [PATCH] tracefs/eventfs: Use root and instance inodes as default ownership Message-ID: <20240104014837.GO1674809@ZenIV> References: <20240103203246.115732ec@gandalf.local.home> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240103203246.115732ec@gandalf.local.home> Sender: Al Viro On Wed, Jan 03, 2024 at 08:32:46PM -0500, Steven Rostedt wrote: > + /* Get the tracefs root from the parent */ > + inode = d_inode(dentry->d_parent); > + inode = d_inode(inode->i_sb->s_root); That makes no sense. First of all, for any positive dentry we have dentry->d_sb == dentry->d_inode->i_sb. And it's the same for all dentries on given superblock. So what's the point of that dance? If you want the root inode, just go for d_inode(dentry->d_sb->s_root) and be done with that...