ütree 7c4352513d8a108b916d2cbe16234346addf179c parent 2d4c8266774188cda7f7e612e6dfb8ad12c579d5 author Nick Piggin 1222117070 -0700 committer Linus Torvalds 1222182554 -0700 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 Reported-and-tested-by: Ingo Molnar Cc: Peter Zijlstra Cc: Matt Mackall Cc: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds ćq/Mµ