us_manager: replace GFP_ATOMIC by GFP_KERNEL 62/157062/2
authorVyacheslav Cherkashin <v.cherkashin@samsung.com>
Fri, 20 Oct 2017 13:19:36 +0000 (16:19 +0300)
committerVyacheslav Cherkashin <v.cherkashin@samsung.com>
Mon, 23 Oct 2017 08:18:49 +0000 (11:18 +0300)
Now in a lot of places doesn't requires GFP_ATOMIC flag,
because these code executes in non-atomic context.

Change-Id: Ie6d85f14ac04375c30aa120804f97af5f985aa12
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
modules/us_manager/img/img_file.c
modules/us_manager/img/img_proc.c
modules/us_manager/pf/pf_group.c
modules/us_manager/sspt/sspt_feature.c
modules/us_manager/sspt/sspt_file.c
modules/us_manager/sspt/sspt_filter.c
modules/us_manager/sspt/sspt_ip.c
modules/us_manager/us_slot_manager.c

index e5165d9ad315c90058034418fa84ff0cd8fcc5c7..ea8d094301113952f1b26796b2bc4adc14424390 100644 (file)
@@ -46,7 +46,7 @@ struct img_file *img_file_create(struct dentry *dentry)
 {
        struct img_file *file;
 
-       file = kmalloc(sizeof(*file), GFP_ATOMIC);
+       file = kmalloc(sizeof(*file), GFP_KERNEL);
        if (file == NULL) {
                pr_err("%s: failed to allocate memory\n", __func__);
                return ERR_PTR(-ENOMEM);
index 40f647053bcd607672cb04c7205df1c411e7c56e..55c7d82d6771b97ffee6453bb2e41ed6a552ca62 100644 (file)
@@ -57,7 +57,7 @@ struct img_proc *img_proc_create(void)
 {
        struct img_proc *proc;
 
-       proc = kmalloc(sizeof(*proc), GFP_ATOMIC);
+       proc = kmalloc(sizeof(*proc), GFP_KERNEL);
        if (proc) {
                atomic_inc(&proc_counter);
                INIT_LIST_HEAD(&proc->files.head);
index 6dfcf946e1bf9866a98bff3e8ef2efe86861e81e..2e7167bc916e0db70e26d55c30438429b5345927 100644 (file)
@@ -90,7 +90,7 @@ static void pfg_list_wunlock(void)
 /* struct pl_struct */
 static struct pl_struct *create_pl_struct(struct sspt_proc *proc)
 {
-       struct pl_struct *pls = kmalloc(sizeof(*pls), GFP_ATOMIC);
+       struct pl_struct *pls = kmalloc(sizeof(*pls), GFP_KERNEL);
 
        if (pls) {
                INIT_LIST_HEAD(&pls->list);
@@ -109,7 +109,7 @@ static void free_pl_struct(struct pl_struct *pls)
 
 static struct pf_group *pfg_create(void)
 {
-       struct pf_group *pfg = kmalloc(sizeof(*pfg), GFP_ATOMIC);
+       struct pf_group *pfg = kmalloc(sizeof(*pfg), GFP_KERNEL);
 
        if (pfg == NULL)
                return NULL;
index bc2c84de335ded569c0a00c2d385daed7b90788c..40df6c6889b4dae09db82b0d4c2a8ff9e9afe65d 100644 (file)
@@ -81,7 +81,7 @@ struct sspt_feature *sspt_create_feature(void)
 {
        struct sspt_feature *f;
 
-       f = kmalloc(sizeof(*f), GFP_ATOMIC);
+       f = kmalloc(sizeof(*f), GFP_KERNEL);
        if (f) {
                struct sspt_feature_data *fd;
                struct sspt_feature_img *fi;
@@ -143,7 +143,7 @@ static struct sspt_feature_img *create_feature_img(void *(*alloc)(void),
 {
        struct sspt_feature_img *fi;
 
-       fi = kmalloc(sizeof(*fi), GFP_ATOMIC);
+       fi = kmalloc(sizeof(*fi), GFP_KERNEL);
        if (fi) {
                INIT_LIST_HEAD(&fi->list);
                fi->alloc = alloc;
index 2c74b74e1f7a173c15d84bfbe28218c839cb9405..417c94982958d27fb459c7f1cd9eee7d27efa0d1 100644 (file)
@@ -73,7 +73,7 @@ struct sspt_file *sspt_file_create(struct dentry *dentry, int page_cnt)
 {
        int i, table_size;
        struct hlist_head *heads;
-       struct sspt_file *obj = kmalloc(sizeof(*obj), GFP_ATOMIC);
+       struct sspt_file *obj = kmalloc(sizeof(*obj), GFP_KERNEL);
 
        if (obj == NULL)
                return NULL;
@@ -88,7 +88,7 @@ struct sspt_file *sspt_file_create(struct dentry *dentry, int page_cnt)
        obj->htable.bits = calculation_hash_bits(page_cnt);
        table_size = htable_size(obj);
 
-       heads = kmalloc(sizeof(*obj->htable.heads) * table_size, GFP_ATOMIC);
+       heads = kmalloc(sizeof(*obj->htable.heads) * table_size, GFP_KERNEL);
        if (heads == NULL)
                goto err;
 
index f7a0799fe54efb53986330e7ec8b9214bbdbf380..bca88bd8632bb60c4a5209106a74363472af802c 100644 (file)
@@ -10,7 +10,7 @@ struct sspt_filter *sspt_filter_create(struct sspt_proc *proc,
 {
        struct sspt_filter *fl;
 
-       fl = kmalloc(sizeof(*fl), GFP_ATOMIC);
+       fl = kmalloc(sizeof(*fl), GFP_KERNEL);
        if (fl == NULL)
                return NULL;
 
index 0f0b4fffadb57b1abfe0ebd24f3142dea0510204..e36f80a722c39b0e6849828a950aff00b0e500df 100644 (file)
@@ -44,7 +44,7 @@ struct sspt_ip *sspt_ip_create(struct img_ip *img_ip, struct sspt_page *page)
 {
        struct sspt_ip *ip;
 
-       ip = kmalloc(sizeof(*ip), GFP_ATOMIC);
+       ip = kmalloc(sizeof(*ip), GFP_KERNEL);
        if (!ip)
                return NULL;
 
index 56e8f284f63b4f002a495c2a2bc79d7dc42f758e..90159be5b1e9eb2f8202c7a038375fe11c03d456 100644 (file)
@@ -78,7 +78,7 @@ static void sm_free_us(struct slot_manager *sm, void *ptr)
  */
 struct slot_manager *create_sm_us(struct task_struct *task)
 {
-       struct slot_manager *sm = kmalloc(sizeof(*sm), GFP_ATOMIC);
+       struct slot_manager *sm = kmalloc(sizeof(*sm), GFP_KERNEL);
 
        if (sm == NULL)
                return NULL;