Re: [PATCH] Make invalidate_inode_pages2() work again

Nick Piggin
2006-09-26T06:24:45Z

Nick Piggin wrote:

> So I really dislike get_user_pages for reasons such as this. IMO it would
> be cool if get_user_pages when the caller wants to write, would return
> with
> the page dirty and a bit set to prevent writeout from cleaning it
> until it
> has been finished with (via put_user_pages).
>
> Actually, _ideally_, maybe keeping the mapping around (ie. holding at
> least a read lock on mmap_sem) would do the trick. The presence of the
> mapping will be seen by the invalidate routines[*], and in general things
> might be simplified.

No, I guess that isn't going to work, because it'll mean one thread can
DoS the others WRT mmap and brk. I'll look into the per-page flag bit
idea.