Lines Matching refs:log
295 fc->log.prefix = fs_type->name; in alloc_fs_context()
410 if (fc->log.log) in vfs_dup_fs_context()
411 refcount_inc(&fc->log.log->usage); in vfs_dup_fs_context()
436 void logfc(struct fc_log *log, const char *prefix, char level, const char *fmt, ...) in logfc() argument
442 if (!log) { in logfc()
458 unsigned int logsize = ARRAY_SIZE(log->buffer); in logfc()
464 index = log->head & (logsize - 1); in logfc()
465 BUILD_BUG_ON(sizeof(log->head) != sizeof(u8) || in logfc()
466 sizeof(log->tail) != sizeof(u8)); in logfc()
467 if ((u8)(log->head - log->tail) == logsize) { in logfc()
469 if (log->need_free & (1 << index)) in logfc()
470 kfree(log->buffer[index]); in logfc()
471 log->tail++; in logfc()
474 log->buffer[index] = q ? q : "OOM: Can't store error string"; in logfc()
476 log->need_free |= 1 << index; in logfc()
478 log->need_free &= ~(1 << index); in logfc()
479 log->head++; in logfc()
490 struct fc_log *log = fc->log.log; in put_fc_log() local
493 if (log) { in put_fc_log()
494 if (refcount_dec_and_test(&log->usage)) { in put_fc_log()
495 fc->log.log = NULL; in put_fc_log()
497 if (log->need_free & (1 << i)) in put_fc_log()
498 kfree(log->buffer[i]); in put_fc_log()
499 kfree(log); in put_fc_log()