mm: do_mmap_pgoff: cleanup the usage of file_inode()
authorOleg Nesterov <oleg@redhat.com>
Wed, 11 Sep 2013 21:20:19 +0000 (14:20 -0700)
committerDanny Wood <danwood76@gmail.com>
Thu, 28 Jan 2021 09:32:01 +0000 (09:32 +0000)
commitfbe5786470156dd9e1b1ac43038fdc7d7cb7abd8
treeee8253081bf626e508b46440261f0cff72b29ab1
parent475069d6426ba9cd7f21886bfe7da352ec6d5582
mm: do_mmap_pgoff: cleanup the usage of file_inode()

Simple cleanup.  Move "struct inode *inode" variable into "if (file)"
block to simplify the code and avoid the unnecessary check.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Colin Cross <ccross@android.com>
Cc: David Rientjes <rientjes@google.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Change-Id: I1bf739a9e3175cf5d3c1d3b421bf5daa48d5f1b5
mm/mmap.c