Nick Piggin db203d53d4 mm: tiny-shmem fix lock ordering: mmap_sem vs i_mutex
tiny-shmem calls do_truncate in shmem_file_setup.  do_truncate takes
i_mutex, and shmem_file_setup is called with mmap_sem held.  However
i_mutex nests outside mmap_sem.

Copy the code in shmem.c to avoid this problem.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Nick Piggin <npiggin@suse.de>
Reported-and-tested-by: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Matt Mackall <mpm@selenic.com>
Cc: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-09-23 08:09:14 -07:00
..
2008-07-28 16:30:21 -07:00
2008-07-24 10:47:17 -07:00
2008-07-28 16:30:21 -07:00
2008-08-04 21:31:34 -07:00
2008-08-04 21:31:34 -07:00
2008-08-04 16:58:45 -07:00
2008-07-28 16:30:21 -07:00
2008-07-28 16:30:21 -07:00
2008-07-28 16:30:21 -07:00
2008-08-04 16:01:47 +09:00
2008-07-26 12:00:06 -07:00
2008-07-26 12:00:06 -07:00
2008-08-20 15:40:32 -07:00
2008-08-04 21:31:34 -07:00
2008-07-29 23:44:26 +03:00
2008-07-29 23:44:26 +03:00
2008-08-20 15:40:30 -07:00
2008-08-04 21:31:34 -07:00
2008-08-04 21:31:34 -07:00
2008-07-26 12:00:07 -07:00
2008-08-04 21:31:34 -07:00