During the seq_printf,the mmap_sem_read_lock protection is not
required.
Link: https://lkml.kernel.org/r/20230622040152.1173-1-lipeifeng@oppo.com
Signed-off-by: lipeifeng <lipeifeng@oppo.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Liam R. Howlett <Liam.Howlett@oracle.com>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
                sbytes += kobjsize(mm);
        else
                bytes += kobjsize(mm);
-       
+
        if (current->fs && current->fs->users > 1)
                sbytes += kobjsize(current->fs);
        else
 
        bytes += kobjsize(current); /* includes kernel stack */
 
+       mmap_read_unlock(mm);
+
        seq_printf(m,
                "Mem:\t%8lu bytes\n"
                "Slack:\t%8lu bytes\n"
                "Shared:\t%8lu bytes\n",
                bytes, slack, sbytes);
-
-       mmap_read_unlock(mm);
 }
 
 unsigned long task_vsize(struct mm_struct *mm)