usb: gadget: f_fs: Give chance to retry malloc for large size buffer
authorDongwoo Lee <dwoo08.lee@samsung.com>
Fri, 26 Oct 2018 01:41:41 +0000 (10:41 +0900)
committerHoegeun Kwon <hoegeun.kwon@samsung.com>
Tue, 30 Mar 2021 01:39:32 +0000 (10:39 +0900)
commit03b14670b1d1f98a70da2306ba68ce089a7a0c27
tree840f6693efb133b2a526d374b2156791ce9846e1
parent750cb578afcf72b5d18006f7010c4a9aa6cc27c2
usb: gadget: f_fs: Give chance to retry malloc for large size buffer

The f_fs daemons usually use large size buffer for increasing transfer
performance, but it can cause memory allocation failure in case of
that buddy space is fragmented. Since this, instead of just returning
error in this case, give the chance to retry to allocate memory with
a half length in order to prevent daemon crash due to failure of
buffer allocation.

Change-Id: I2171932b8cb565102d63eb82c114987b85d26ed9
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
drivers/usb/gadget/function/f_fs.c