finding 'struct vfsmount' by given 'struct super_block'

From: Tigran Aivazian (
Date: Mon May 08 2000 - 05:47:37 EST

Hi Alexander,

If I have a filesystem that is guaranteed to be mounted no more (and no
less) than once how do I find the vfsmount structure by given superblock?

I tried:

mnt = list_entry(&sb->s_mounts, struct vfsmount, mnt_list);


mnt = list_entry(&sb->s_mounts, struct vfsmount, mnt_instances);

and they both point to garbage. I think ->mnt_list is expected to be wrong
as it is headed by vfsmntlist.prev and not by &sb->s_mounts but
->mnt_instances should work (judging from add_vfsmnt()), no?

Also, am I right in thinking that ->mnt_dirname is on its way out as the
correct way to get the dirname is by using d_path() on ->mnt_root? (as
get_filesystem_info() does).


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

This archive was generated by hypermail 2b29 : Mon May 15 2000 - 21:00:11 EST