logfs: fix deadlock in logfs_get_wblocks, hold and wait on super->s_write_mutex
logfs: fix deadlock in logfs_get_wblocks, hold and wait on super->s_write_mutex

do_logfs_journal_wl_pass() should use GFP_NOFS for memory allocation GC
code calls btree_insert32 with GFP_KERNEL while holding a mutex
super->s_write_mutex.

The same mutex is used in address_space_operations->writepage(), and a
call to writepage() could be triggered as a result of memory allocation
in btree_insert32, causing a deadlock.

Addresses https://bugzilla.kernel.org/show_bug.cgi?id=20342

Signed-off-by: Prasad Joshi <2347d92149f67b22c0b35145327b79c1970d474d@gmail.com>
Cc: Joern Engel <aea8d21973be359ec7d72dd5882345200e3616a6@logfs.org>
Cc: Florian Mickler <73262ad0334ab37227b2f7a0205f51db1e606681@mickler.org>
Cc: "Rafael J. Wysocki" <a11f87183a953ab11f50fbafff689c5a7fa3506c@sisk.pl>
Cc: Maciej Rutecki <b9fc5ee32e9bcd79c24fe827a77b4d80fdc0a8e2@gmail.com>
Signed-off-by: Andrew Morton <5c1e68b099950c134891f0b6e179498a8ebe9cf9@linux-foundation.org>
Signed-off-by: Linus Torvalds <69652caca27c8b940640ad396ab71f93cacec34f@linux-foundation.org>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs