Re: [PATCH 20/20] honor r/w changes at do_remount() time

From: Joshua Hudson
Date: Mon Jul 03 2006 - 14:21:33 EST


On 7/3/06, Al Viro <viro@xxxxxxxxxxxxxxxx> wrote:
On Mon, Jul 03, 2006 at 10:30:14AM -0700, Dave Hansen wrote:
> On Wed, 2006-06-28 at 06:19 +0100, Al Viro wrote:
> > * make the moments when i_nlink hits 0 bump the superblock writers
> > count; drop it when such sucker gets freed on final iput.
>
> Could you elaborate on this one a bit?
>
> I assume that there are rules that once i_nlink hits 0, it never goes
> back up again. It seems that a whole bunch (if not all) of the
> individual filesystems do things to it. Is it really necessary to go
> into all of those looking for the places that i_nlink hits 0? Seems
> like it would be an awful lot of patching.

That would be a poor assumption. Somebody could do ln /proc/pid/fd/3
/mnt/newname at this point. In my personal filesystem, there is an
ioctl that does the equivalent of link(handle, "path"). Both of these
allow the link count to rise from zero.
-
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/