diff options
author | Li Zefan <lizf@cn.fujitsu.com> | 2009-04-03 03:31:34 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-04-03 08:48:11 -0400 |
commit | 7635b03adf3d7b84da7649b81efa91e6ebf11b85 (patch) | |
tree | 072f7292c865162b7fb00fa33a68f0486f327563 | |
parent | a4b3ada83d06554d307dd54abdc62b2e5648264a (diff) |
blktrace: small cleanup in blk_msg_write()
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: "Alan D. Brunelle" <alan.brunelle@hp.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
LKML-Reference: <49D5BB56.7000807@cn.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r-- | kernel/trace/blktrace.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c index a400b861fad3..73d7860b72e2 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, | |||
327 | char *msg; | 327 | char *msg; |
328 | struct blk_trace *bt; | 328 | struct blk_trace *bt; |
329 | 329 | ||
330 | if (count > BLK_TN_MAX_MSG - 1) | 330 | if (count >= BLK_TN_MAX_MSG) |
331 | return -EINVAL; | 331 | return -EINVAL; |
332 | 332 | ||
333 | msg = kmalloc(count + 1, GFP_KERNEL); | 333 | msg = kmalloc(count + 1, GFP_KERNEL); |