android_kernel_xiaomi_sm8350/fs/ramfs
David Howells 0e8f989a25 NOMMU: Fix cleanup handling in ramfs_nommu_get_umapped_area()
Fix cleanup handling in ramfs_nommu_get_umapped_area() by only freeing the
number of pages that find_get_pages() said it had returned (nr) rather than
attempting to free the number of pages we asked for (lpages) - thus avoiding
the situation whereby put_page() may be handed NULL pointers if
find_get_pages() returned fewer pages that were requested.

Also avoid a warning about nr being uninitialised and the need for an
if-statement in the cleanup path by using appropriate gotos.

Signed-off-by: David Howells <dhowells@redhat.com>
2009-01-08 12:04:46 +00:00
..
file-mmu.c ramfs: enable splice write 2008-07-04 09:52:14 +02:00
file-nommu.c NOMMU: Fix cleanup handling in ramfs_nommu_get_umapped_area() 2009-01-08 12:04:46 +00:00
inode.c zero i_uid/i_gid on inode allocation 2009-01-05 11:54:28 -05:00
internal.h fs/ramfs/ extern cleanup 2008-04-29 08:06:00 -07:00
Makefile