usb: gadget: Fix second argument of percpu_ida_alloc()
authorBart Van Assche <bart.vanassche@sandisk.com>
Fri, 18 Nov 2016 23:42:41 +0000 (15:42 -0800)
committerBart Van Assche <bart.vanassche@sandisk.com>
Fri, 9 Dec 2016 18:20:08 +0000 (10:20 -0800)
Pass a task state as second argument to percpu_ida_alloc().

Fixes: commit 71e7ae8e1fb2 ("usb-gadget/tcm: Conversion to percpu_ida tag pre-allocation")
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Cc: Nicholas Bellinger <nab@linux-iscsi.org>
Cc: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/gadget/function/f_tcm.c

index 197f73386fac9ab45473de09db462ab5e4640d90..d2351139342f6200209078e769e04f5ea1eb2d1f 100644 (file)
@@ -1073,7 +1073,7 @@ static struct usbg_cmd *usbg_get_cmd(struct f_uas *fu,
        struct usbg_cmd *cmd;
        int tag;
 
-       tag = percpu_ida_alloc(&se_sess->sess_tag_pool, GFP_ATOMIC);
+       tag = percpu_ida_alloc(&se_sess->sess_tag_pool, TASK_RUNNING);
        if (tag < 0)
                return ERR_PTR(-ENOMEM);