Re: question on your MOUNT_REWRITE changes.

From: Alexander Viro (aviro@redhat.com)
Date: Sun Apr 16 2000 - 20:56:49 EST


On Fri, 14 Apr 2000, Tigran Aivazian wrote:

> On Fri, 14 Apr 2000, Tigran Aivazian wrote:
> > i.e. how do I get 'struct vfsmount' by given 'dentry *where'?
> >
> > My guess is that I can't. Instead I should have kept 'struct file'
> > corresponding to 'where' and used f_vfsmnt - is this correct? (assuming
> > that 'where' is always a mountpoint)
> >
>
> actually, I just realized - I don't have struct file for that, all I have
> is 'struct super_block' from where I got 'struct dentry' as
> 's_root->d_covers' thereof. So, I need to presumably go through vfsmntlist
> and find 'struct vfsmount' with the mnt_sb matching my given sb.
>
> Shouldn't there be a generic function that would find 'struct vfsmount'
> by given 'struct super_block' and that should worry about locking/walking
> vfsmntlist? like find_vfsmnt(sb)? Or should one keep a pointer s_vfsmnt
> in 'struct super_block'?

Not, because there is no such thing as "the vfsmount of given superblock".
There may be many. There may be none. What are you actually trying to do?

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Apr 23 2000 - 21:00:09 EST