X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=net%2Ftux%2Flogger.c;h=c0c2cc3f4c1475ead12409a1e64759cfcccabe02;hb=9464c7cf61b9433057924c36e6e02f303a00e768;hp=67ef7c162b3cbebb4b89ba036eef7022e329f669;hpb=41689045f6a3cbe0550e1d34e9cc20d2e8c432ba;p=linux-2.6.git diff --git a/net/tux/logger.c b/net/tux/logger.c index 67ef7c162..c0c2cc3f4 100644 --- a/net/tux/logger.c +++ b/net/tux/logger.c @@ -29,7 +29,7 @@ * ****************************************************************/ -static DEFINE_SPINLOCK(log_lock); +static spinlock_t log_lock = SPIN_LOCK_UNLOCKED; static unsigned int log_head, log_tail; static char * log_buffer = NULL; static DECLARE_WAIT_QUEUE_HEAD(log_wait); @@ -767,10 +767,6 @@ static int logger_thread (void *data) if (log_buffer) TUX_BUG(); log_buffer = vmalloc(LOG_LEN); - if (!log_buffer) { - TUX_BUG(); - goto out; - } memset(log_buffer, 0, LOG_LEN); log_head = log_tail = 0; @@ -808,7 +804,7 @@ static int logger_thread (void *data) log_buffer = NULL; stop_logger = 0; wake_up(&stop_logger_wait); -out: + set_fs(oldmm); return 0;