Re: [PATCH] tracefs/eventfs: Use root and instance inodes as default ownership

From
Al Viro <viro@zeniv.linux.org.uk>
Date
2024-01-04 01:48:42
Also in
linux-fsdevel, lkml
Reply to
Steven Rostedt, 2024-01-04
On Wed, Jan 03, 2024 at 08:32:46PM -0500, Steven Rostedt wrote:
quoted hunk ↗ jump to hunk
+	/* 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...
Thread (37 messages) 37 messages, 5 authors, last reply 2024-01-12
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help