mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
proc: do mmput ASAP for /proc/*/map_files
mm_struct is not needed while printing as all the data was already extracted. Link: http://lkml.kernel.org/r/20180309223120.GC3843@avx2 Signed-off-by: Alexey Dobriyan <[email protected]> Reviewed-by: Andrew Morton <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
58c501aab3
commit
fe079a5e10
1 changed files with 1 additions and 1 deletions
|
|
@ -2211,6 +2211,7 @@ proc_map_files_readdir(struct file *file, struct dir_context *ctx)
|
|||
}
|
||||
}
|
||||
up_read(&mm->mmap_sem);
|
||||
mmput(mm);
|
||||
|
||||
for (i = 0; i < nr_files; i++) {
|
||||
char buf[4 * sizeof(long) + 2]; /* max: %lx-%lx\0 */
|
||||
|
|
@ -2228,7 +2229,6 @@ proc_map_files_readdir(struct file *file, struct dir_context *ctx)
|
|||
}
|
||||
if (fa)
|
||||
flex_array_free(fa);
|
||||
mmput(mm);
|
||||
|
||||
out_put_task:
|
||||
put_task_struct(task);
|
||||
|
|
|
|||
Loading…
Reference in a new issue