Re: [PATCH 3/5] cifsd: add file operations

Sergey Senozhatsky
2021-03-22T09:40:19Z

On (21/03/22 10:04), Dan Carpenter wrote:
>
> On Mon, Mar 22, 2021 at 02:13:42PM +0900, Namjae Jeon wrote:
> > +void *ksmbd_alloc(size_t size)
> > +{
> > + return kvmalloc(size, GFP_KERNEL | __GFP_ZERO);
>
>
> This patch adds a bunch of wrappers around kvmalloc(). Don't do that.

Agreed. This was not cleaned up properly. The initial implementation
of that function (IIRC... it was sometime in 2018) basically contained
kvmalloc() implementation, because back in the days Samsung used kernel
version that simply didn't have kvmalloc() ( < KERNEL_VERSION(5, 0, 0))