Re: [PATCH 1/2] btrfs-progs: fix nanosecs in task_period_start

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 07/05/2018 03:20 AM, Stéphane Lesimple wrote:
This is a single-line fix on the preexisting task_period_start function.

Signed-off-by: Stéphane Lesimple <stephane_btrfs@xxxxxxxxxxx>

Reviewed-by: Su Yue <suy.fnst@xxxxxxxxxxxxxx>

---
  task-utils.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/task-utils.c b/task-utils.c
index 12b0002..284cbb3 100644
--- a/task-utils.c
+++ b/task-utils.c
@@ -102,7 +102,7 @@ int task_period_start(struct task_info *info, unsigned int period_ms)
  	info->periodic.wakeups_missed = 0;
sec = period_ms / 1000;
-	ns = (period_ms - (sec * 1000)) * 1000;
+	ns = (period_ms - (sec * 1000)) * 1000 * 1000;
  	itval.it_interval.tv_sec = sec;
  	itval.it_interval.tv_nsec = ns;
  	itval.it_value.tv_sec = sec;



--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux