Re: [PATCH] cramfs corruption after BLKFLSBUF on loop device

From: Andrew Morton
Date: Thu Jun 01 2006 - 15:10:32 EST


On Thu, 1 Jun 2006 12:12:00 -0700
Andrew Morton <akpm@xxxxxxxx> wrote:

> I'd have
> thought that it'd be appropriate to take i_mutex while running
> invalidate_inode_pages().

Let me add: it'd be appropriate, but also difficult -
invalidate_inode_pages() is called from all sorts of contexts, including
inside spinlock.

A quickie fix would be to take i_mutex at the top level, on entry to the
ioctl. But that'll only fix the BLKFLSBUF case.

-
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/