Re: [RFC][PATCH 1/2] pin kern mounts as writable

From: Al Viro
Date: Sat Sep 12 2009 - 09:42:22 EST


On Mon, Aug 03, 2009 at 02:59:40PM -0700, Dave Hansen wrote:

> If we are going to continue to use mnt_clone_write() inside
> of init_file(), then we're going to need some kind of extra
> handling.
>
> What I want to do in the next patch is add a debugging check
> in mnt_clone_write() to double-check that there *is* a real
> writer on the mount before mnt_clone_write() succeeds. To
> do that, we either need to check for MS_KERNMOUNT around
> that debug check, or we need to make sure that these kern
> mounts *have* a write already.
>
> I'm choosing to make sure they always have a write.

> + err = mnt_want_write(mnt);
> + WARN_ON(err);

And what would happen to that when we do it to a filesystem that is
made read-only by its ->get_sb()?
--
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/