summaryrefslogtreecommitdiffstats
path: root/include/trace
diff options
context:
space:
mode:
authorChao Yu <yuchao0@huawei.com>2017-08-07 23:12:46 +0800
committerJaegeuk Kim <jaegeuk@kernel.org>2017-08-15 10:40:14 -0700
commitb8c502b81e3f899c6488967dec61eed0f5907db3 (patch)
treeec5f157c9804945eb46dc13b2fc3ab58d9e03bc6 /include/trace
parent9a20d391cd099d547c0f17626bf6f13e06da519a (diff)
downloadop-kernel-dev-b8c502b81e3f899c6488967dec61eed0f5907db3.zip
op-kernel-dev-b8c502b81e3f899c6488967dec61eed0f5907db3.tar.gz
f2fs: fix potential overflow when adjusting GC cycle
While comparing signed and unsigned variables, compiler will converts the signed value to unsigned one, due to this reason, {in,de}crease_sleep_time may return overflowed result. Signed-off-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'include/trace')
-rw-r--r--include/trace/events/f2fs.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/trace/events/f2fs.h b/include/trace/events/f2fs.h
index 6f77a27..db5c982 100644
--- a/include/trace/events/f2fs.h
+++ b/include/trace/events/f2fs.h
@@ -543,14 +543,14 @@ TRACE_EVENT(f2fs_map_blocks,
TRACE_EVENT(f2fs_background_gc,
- TP_PROTO(struct super_block *sb, long wait_ms,
+ TP_PROTO(struct super_block *sb, unsigned int wait_ms,
unsigned int prefree, unsigned int free),
TP_ARGS(sb, wait_ms, prefree, free),
TP_STRUCT__entry(
__field(dev_t, dev)
- __field(long, wait_ms)
+ __field(unsigned int, wait_ms)
__field(unsigned int, prefree)
__field(unsigned int, free)
),
@@ -562,7 +562,7 @@ TRACE_EVENT(f2fs_background_gc,
__entry->free = free;
),
- TP_printk("dev = (%d,%d), wait_ms = %ld, prefree = %u, free = %u",
+ TP_printk("dev = (%d,%d), wait_ms = %u, prefree = %u, free = %u",
show_dev(__entry->dev),
__entry->wait_ms,
__entry->prefree,
OpenPOWER on IntegriCloud