Re: [patch 00/13] vfs: add helpers to check r/o bind mounts

From: Dave Hansen
Date: Thu May 01 2008 - 12:40:39 EST


On Thu, 2008-05-01 at 10:08 +0200, Miklos Szeredi wrote:
> Sorry for the claptrap. I'm going to resubmit this one more time
> with some slight modifications and additions, and it'd be really nice
> if you or other interested parties would provide comments and opinions
> (either way), because I don't think me and Al have anything new to say
> to each other.

I was trying to stay out of it a bit, since you both have very good
points. :)

But, from a purely aesthetic point of view, I like the patches. They do
make r/o mount detection less error-prone in coding. They also remove
more code than they add.

I also certainly understand Al's point about why it puts vfsmounts in a
place where they probably shouldn't be exposed.

Is there a way we could pass around a vfs-internal object to these
things? Maybe something that is like an opaque token only known to the
vfs?

linux/mount.h:

struct hidden_mount;

fs/namespace.c:

struct hidden_mount {
struct vfsmount *mnt;
};

int mnt_want_write(struct hidden_mount *hidmnt)
{
return __mnt_want_write(hidmnt->mnt);
}

We could have *that* passed down the way that you're currently passing
the vfsmount.

-- Dave

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