Re: 2.6.1: kernel BUG at mm/swapfile.c:806

From: Mike Fedyk
Date: Fri Jan 16 2004 - 13:32:20 EST


On Fri, Jan 16, 2004 at 05:05:55PM +0000, Hugh Dickins wrote:
> On Fri, 16 Jan 2004, marcel cotta wrote:
> > i just tried to less it - the process went right into D state :p
>
> That sounds like an issue that came up a month or two back: seems that
> sys_swapon intentionally leaves a semaphore down on a swapfile, until
> sys_swapoff. I don't like that at all! The noble reason was to stop
> that file from being deleted or truncated while in use for swap,
> but perhaps we can devise a better way to achieve that sometime -
> set S_IMMUTABLE?

Can't the kernel just keep a reference to the inode while it is used for
swap, and let it unlink after swapoff (and all other refs are gone) using
normal unix semantics?
-
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/