On Wed, Aug 26, 2020 at 06:14:02PM +0200, Carlos Maiolino wrote: > This patch aims to replace kmem_zalloc_large() with global kernel memory > API. So, all its callers are now using kvzalloc() directly, so kmalloc() > fallsback to vmalloc() automatically. > > Signed-off-by: Carlos Maiolino <cmaiolino@xxxxxxxxxx> > --- > > Changelog: > > V2: > Remove __GFP_RETRY_MAYFAIL from the kvzalloc() calls > > fs/xfs/kmem.h | 6 ------ > fs/xfs/scrub/symlink.c | 3 ++- > fs/xfs/xfs_acl.c | 2 +- > fs/xfs/xfs_ioctl.c | 4 ++-- > fs/xfs/xfs_rtalloc.c | 2 +- > 5 files changed, 6 insertions(+), 11 deletions(-) > > diff --git a/fs/xfs/kmem.h b/fs/xfs/kmem.h > index fb1d066770723..38007117697ef 100644 > --- a/fs/xfs/kmem.h > +++ b/fs/xfs/kmem.h > @@ -71,12 +71,6 @@ kmem_zalloc(size_t size, xfs_km_flags_t flags) > return kmem_alloc(size, flags | KM_ZERO); > } > > -static inline void * > -kmem_zalloc_large(size_t size, xfs_km_flags_t flags) > -{ > - return kmem_alloc_large(size, flags | KM_ZERO); > -} > - > /* > * Zone interfaces > */ > diff --git a/fs/xfs/scrub/symlink.c b/fs/xfs/scrub/symlink.c > index 5641ae512c9ef..5a721a9adea78 100644 > --- a/fs/xfs/scrub/symlink.c > +++ b/fs/xfs/scrub/symlink.c > @@ -22,11 +22,12 @@ xchk_setup_symlink( > struct xfs_inode *ip) > { > /* Allocate the buffer without the inode lock held. */ > - sc->buf = kmem_zalloc_large(XFS_SYMLINK_MAXLEN + 1, 0); > + sc->buf = kvzalloc(XFS_SYMLINK_MAXLEN + 1, GFP_KERNEL); > if (!sc->buf) > return -ENOMEM; > > return xchk_setup_inode_contents(sc, ip, 0); > + > } With the extra added line removed, Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx> -- Dave Chinner david@xxxxxxxxxxxxx