> > > > > And having the vfsmount available within vfs_...() functions means,
Right, we do want to prevent that happening.
And for example moving read-only mount checks inside vfs_...() would
ensure that.
And we end up random callers forgetting some of the checks, like we
have now with nfsd. Not good at all.
I think it's still a lot better all the checks are always done, even
if not strictly necessary for a certain caller, than if the caller has
to make sure the necessary ones do get done.
Assuming of course, that all valid users _do_ have the vfsmount
available, which I think is true. If you have a counterexample,
please let us know.
If not all (but most) callers have the vfsmount available, then a new
helper makes sense.
If there was only one caller which needed a certain check, then moving
that into the caller would be the right thing of course. But that's
not the case here.
Miklos
--