Re: [PATCH v2] mm/shmem.c: make shmem_mapping() inline

2020-11-15 Thread Hui Su
On Sat, Nov 14, 2020 at 10:50:39AM -0800, Andrew Morton wrote: > On Sat, 14 Nov 2020 13:51:34 +0800 Hui Su wrote: > > > inline the shmem_mapping(), and use shmem_mapping() > > instead of 'inode->i_mapping->a_ops == _aops' > > in shmem_evict_inode(). > > > > ... > > > > --- a/mm/shmem.c > > +++

Re: [PATCH v2] mm/shmem.c: make shmem_mapping() inline

2020-11-14 Thread Matthew Wilcox
On Sat, Nov 14, 2020 at 10:50:39AM -0800, Andrew Morton wrote: > But really, shmem_mapping() isn't worth an out-of-line call from any > callsite - it would be best to make it inlined everywhere. > > - make shmem_aops global > - declare shmem_aops in shmem_fs.h > - export shmem_aops to modules for

Re: [PATCH v2] mm/shmem.c: make shmem_mapping() inline

2020-11-14 Thread Andrew Morton
On Sat, 14 Nov 2020 13:51:34 +0800 Hui Su wrote: > inline the shmem_mapping(), and use shmem_mapping() > instead of 'inode->i_mapping->a_ops == _aops' > in shmem_evict_inode(). > > ... > > --- a/mm/shmem.c > +++ b/mm/shmem.c > @@ -1152,7 +1152,7 @@ static void shmem_evict_inode(struct inode

[PATCH v2] mm/shmem.c: make shmem_mapping() inline

2020-11-13 Thread Hui Su
inline the shmem_mapping(), and use shmem_mapping() instead of 'inode->i_mapping->a_ops == _aops' in shmem_evict_inode(). v1->v2: remove the inline for func declaration in shmem_fs.h Reviewed-by: Pankaj Gupta Reported-by: kernel test robot Signed-off-by: Hui Su --- mm/shmem.c | 4 ++-- 1