Messages in this thread | | | Date | Wed, 12 Feb 2014 11:38:50 +0300 | From | Sergey Senozhatsky <> | Subject | Re: [PATCHv3 1/4] zram: introduce compressing backend abstraction |
| |
On (02/12/14 16:08), Minchan Kim wrote: [..] > > +#include <linux/kernel.h> > > +#include <linux/string.h> > > +#include <linux/slab.h> > > +#include <linux/vmalloc.h> > > +#include <linux/wait.h> > > +#include <linux/sched.h> > > + > > +#include "zram_comp.h" > > + > > +extern struct zram_comp_backend zcomp_lzo; > > + > > +static void workmem_free(struct zram_comp *comp, struct zcomp_workmem *workmem) > > +{ > > + comp->backend->destroy(workmem->private); > > + free_pages((unsigned long)workmem->buffer, 1); > > + kfree(workmem); > > +} > > + > > +/* allocate new workmem structure with ->mem of requested size, > > + * return NULL on error */ > > +static struct zcomp_workmem *workmem_alloc(struct zram_comp *comp) > > +{ > > + struct zcomp_workmem *workmem = kmalloc(sizeof(*workmem), GFP_NOFS); > > > One more thing, pz, say why we need GFP_NOFS in here. >
my bad. it definitely should be GFP_KERNEL.
-ss
| |