mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 03:36:19 +00:00
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>
This commit is contained in:
parent
a4b3ada83d
commit
7635b03adf
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue