From: Li Zefan Date: Fri, 3 Apr 2009 07:31:34 +0000 (+0800) Subject: blktrace: small cleanup in blk_msg_write() X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=7635b03adf3d7b84da7649b81efa91e6ebf11b85;p=linux-2.6-omap-h63xx.git blktrace: small cleanup in blk_msg_write() Signed-off-by: Li Zefan Cc: Arnaldo Carvalho de Melo Cc: "Alan D. Brunelle" Cc: Jens Axboe LKML-Reference: <49D5BB56.7000807@cn.fujitsu.com> Signed-off-by: Ingo Molnar --- diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c index a400b861fad..73d7860b72e 100644 --- a/kernel/trace/blktrace.c +++ b/kernel/trace/blktrace.c @@ -327,7 +327,7 @@ static ssize_t blk_msg_write(struct file *filp, const char __user *buffer, char *msg; struct blk_trace *bt; - if (count > BLK_TN_MAX_MSG - 1) + if (count >= BLK_TN_MAX_MSG) return -EINVAL; msg = kmalloc(count + 1, GFP_KERNEL);