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

Andrew Morton
2006-06-01T19:11:17Z

On Thu, 1 Jun 2006 12:12:00 -0700
Andrew Morton <akpm@osdl.org> 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.