/* tipc_log_resize - change the size of the TIPC log buffer @log_size: print buffer size to use  */
int tipc_log_resize(int log_size)
/* tipc_log_resize - change the size of the TIPC log buffer @log_size: print buffer size to use  */
int tipc_log_resize(int log_size)
{
	int res = 0;
	spin_lock_bh(&print_lock);
	if (TIPC_LOG->buf) {
		kfree(TIPC_LOG->buf);
		TIPC_LOG->buf = NULL;
	}
	if (log_size) {
		if (log_size < TIPC_PB_MIN_SIZE)
			log_size = TIPC_PB_MIN_SIZE;
		res = TIPC_LOG->echo;
		tipc_printbuf_init(TIPC_LOG, kmalloc(log_size, GFP_ATOMIC),
				   log_size);
		TIPC_LOG->echo = res;
		res = !TIPC_LOG->buf;
	}
	spin_unlock_bh(&print_lock);
	return res;
}