vfs: __read_cache_page should use gfp argument rather than GFP_KERNEL
authorDave Kleikamp <dave.kleikamp@oracle.com>
Wed, 21 Dec 2011 17:05:48 +0000 (11:05 -0600)
committerRohan Somvanshi <rsomvanshi@nvidia.com>
Wed, 11 Jan 2012 18:07:42 +0000 (10:07 -0800)
commit3b3a0ffeb47124ac896898f900e9855523b977b3
tree646612f8a5213a1e6690e1c38bd42669544e8aad
parent1b5f5e5c988baf2656f2e84de0700840c0912842
vfs: __read_cache_page should use gfp argument rather than GFP_KERNEL

commit e6f67b8c05f5e129e126f4409ddac6f25f58ffcb upstream.

lockdep reports a deadlock in jfs because a special inode's rw semaphore
is taken recursively.  The mapping's gfp mask is GFP_NOFS, but is not
used when __read_cache_page() calls add_to_page_cache_lru().

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Acked-by: Hugh Dickins <hughd@google.com>
Acked-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

Change-Id: I200c86387cc650dbfb33c8a22ae943ed6996648a
Reviewed-on: http://git-master/r/74187
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Tested-by: Varun Wadekar <vwadekar@nvidia.com>
mm/filemap.c