On Fri, Apr 20, 2012 at 12:58 PM, Al Viro <viro@xxxxxxxxxxxxxxxxxx> wrote: > > So does a bunch of other places. Let me dig out the call graph circa > 3.3.0... Here is the relevant part: Yes, but a lot of those would actually be helped by a helper function that does all of: - grab mmap_sem - call do_m[un]map() - release mmap_sem and that would actually clean them up even in the current case. And then we could do the cleanup in just the helper function. Not all, no. But a preparatory patch that just creates the helper functions for doing brk/mmap/munmap would get rid of a fairly big chunk of them. You can visualize how many of them do that by just doing git grep -5 do_m[un]*map and then high-lghting '_write(' (to visually show the down_write/up_write pairs that surround most of them) by searching for it. Are they all like that? No. But most of the ones outside of mm/ do fit that simple pattern and should probably be fixed up just to have them not contain VM locking details in them *anyway*. Linus -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html