Source kernel commit:
d634525db63e9e946c3229fb93c8d9b763afbaf3
There is no reason for this wrapper existing anymore. All the places
that use KM_NOFS allocation are within transaction contexts and
hence covered by memalloc_nofs_save/restore contexts. Hence we don't
need any special handling of vmalloc for large IOs anymore and
so special casing this code isn't necessary.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
#define GFP_KERNEL ((__force gfp_t)0)
#define GFP_NOFS ((__force gfp_t)0)
#define __GFP_NOFAIL ((__force gfp_t)0)
+#define __GFP_NOLOCKDEP ((__force gfp_t)0)
#define __GFP_ZERO (__force gfp_t)1
}
extern void *kmem_alloc(size_t, int);
-extern void *kmem_alloc_large(size_t, int);
+extern void *kvmalloc(size_t, gfp_t);
extern void *kmem_zalloc(size_t, int);
static inline void
}
void *
-kmem_alloc_large(size_t size, int flags)
+kvmalloc(size_t size, gfp_t flags)
{
- return kmem_alloc(size, flags);
+ if (flags & __GFP_ZERO)
+ return kmem_zalloc(size, 0);
+ return kmem_alloc(size, 0);
}
void *
}
if (!args->value) {
- args->value = kmem_alloc_large(valuelen, KM_NOLOCKDEP);
+ args->value = kvmalloc(valuelen, GFP_KERNEL | __GFP_NOLOCKDEP);
if (!args->value)
return -ENOMEM;
}