btrfs-progs: Check periodic.timer_fd's value before use
authorZhao Lei <zhaolei@cn.fujitsu.com>
Mon, 9 Nov 2015 09:06:53 +0000 (17:06 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 16 Nov 2015 13:23:45 +0000 (14:23 +0100)
commitf3fbb9a39860a6131a408d07238f5c245fac20a2
tree13d73b6516a6f35ddb6c495e20009e731326b978
parent1b9876f761305e499efc3bc6a4dc7d199831cdf8
btrfs-progs: Check periodic.timer_fd's value before use

periodic.timer_fd's value is 0 on inititlize-failed case,
if no value-checking before read(), the code will run as
read(STDIN).

This patch fixed above case.

Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
task-utils.c