kfifo: Make kfifo_initialized work after kfifo_free
After kfifo rework it's no longer possible to reliably know if kfifo is usable, since after kfifo_free(), kfifo_initialized() would still return true. The correct behaviour is needed for at least FHCI USB driver. This patch fixes the issue by resetting the kfifo to zero values (the same approach is used in kfifo_alloc() if allocation failed). Signed-off-by: NAnton Vorontsov <avorontsov@ru.mvista.com> Acked-by: NStefani Seibold <stefani@seibold.net> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
Showing
想要评论请 注册 或 登录