summaryrefslogtreecommitdiff
path: root/kernel/trace/blktrace.c
diff options
context:
space:
mode:
authorLi Zefan <lizf@cn.fujitsu.com>2009-04-03 07:31:34 (GMT)
committerIngo Molnar <mingo@elte.hu>2009-04-03 12:48:11 (GMT)
commit7635b03adf3d7b84da7649b81efa91e6ebf11b85 (patch)
tree072f7292c865162b7fb00fa33a68f0486f327563 /kernel/trace/blktrace.c
parenta4b3ada83d06554d307dd54abdc62b2e5648264a (diff)
downloadlinux-7635b03adf3d7b84da7649b81efa91e6ebf11b85.tar.xz
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>
Diffstat (limited to 'kernel/trace/blktrace.c')
-rw-r--r--kernel/trace/blktrace.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c
index a400b86..73d7860 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);