Lines Matching defs:log
267 fc->log.prefix = fs_type->name;
361 if (fc->log.log)
362 refcount_inc(&fc->log.log->usage);
382 * @fc: The filesystem context to log to.
385 void logfc(struct fc_log *log, const char *prefix, char level, const char *fmt, ...)
391 if (!log) {
407 unsigned int logsize = ARRAY_SIZE(log->buffer);
413 index = log->head & (logsize - 1);
414 BUILD_BUG_ON(sizeof(log->head) != sizeof(u8) ||
415 sizeof(log->tail) != sizeof(u8));
416 if ((u8)(log->head - log->tail) == logsize) {
418 if (log->need_free & (1 << index))
419 kfree(log->buffer[index]);
420 log->tail++;
423 log->buffer[index] = q ? q : "OOM: Can't store error string";
425 log->need_free |= 1 << index;
427 log->need_free &= ~(1 << index);
428 log->head++;
439 struct fc_log *log = fc->log.log;
442 if (log) {
443 if (refcount_dec_and_test(&log->usage)) {
444 fc->log.log = NULL;
446 if (log->need_free & (1 << i))
447 kfree(log->buffer[i]);
448 kfree(log);