Thread (72 messages) 72 messages, 8 authors, 2021-07-07

Re: [PATCH RFC 1/3] fs: introduce helper d_path_fast()

From: Al Viro <viro@zeniv.linux.org.uk>
Date: 2021-05-08 23:16:42
Also in: linux-fsdevel, linux-s390, lkml

On Sat, May 08, 2021 at 10:46:23PM +0000, Al Viro wrote:
On Sat, May 08, 2021 at 03:17:44PM -0700, Linus Torvalds wrote:
quoted
On Sat, May 8, 2021 at 2:06 PM Al Viro [off-list ref] wrote:
quoted
On Sat, May 08, 2021 at 01:39:45PM -0700, Linus Torvalds wrote:
quoted
+static inline int prepend_entries(struct prepend_buffer *b, const struct path *path, const struct path *root, struct mount *mnt)
If anything, s/path/dentry/, since vfsmnt here will be equal to &mnt->mnt all along.
Too subtle for me.

And is it? Because mnt is from

     mnt = real_mount(path->mnt);

earlier, while vfsmount is plain "path->mnt".
static inline struct mount *real_mount(struct vfsmount *mnt)
{
        return container_of(mnt, struct mount, mnt);
}
Basically, struct vfsmount instances are always embedded into struct mount ones.
All information about the mount tree is in the latter (and is visible only if
you manage to include fs/mount.h); here we want to walk towards root, so...

Rationale: a lot places use struct vfsmount pointers, but they've no need to
access all that stuff.  So struct vfsmount got trimmed down, with most of the
things that used to be there migrating into the containing structure.

[Christian Browner Cc'd]
BTW, WTF do we have struct mount.user_ns and struct vfsmount.mnt_userns?
Can they ever be different?  Christian?

	Sigh...  Namespace flavours always remind me of old joke -
Highlander II: There Should've Been Only One...
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help