selftests/mm: gup_longterm: fix a resource leak
authorDing Xiang <dingxiang@cmss.chinamobile.com>
Thu, 31 Aug 2023 09:31:44 +0000 (17:31 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Wed, 4 Oct 2023 17:32:19 +0000 (10:32 -0700)
commitb6afcb94ce331b6d94dbeb56def173483993faf3
tree410443c07b47c79bdcd67f595ec80f97f08f894c
parente19a3f595ae47bd8c034b98eb0b28a3877413387
selftests/mm: gup_longterm: fix a resource leak

The opened file should be closed in run_with_tmpfile(), otherwise resource
leak will occur

Link: https://lkml.kernel.org/r/20230831093144.7520-1-dingxiang@cmss.chinamobile.com
Signed-off-by: Ding Xiang <dingxiang@cmss.chinamobile.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
tools/testing/selftests/mm/gup_longterm.c