diff --git a/lib/fluent/plugin/in_tail.rb b/lib/fluent/plugin/in_tail.rb index 627f7df718..6995397670 100644 --- a/lib/fluent/plugin/in_tail.rb +++ b/lib/fluent/plugin/in_tail.rb @@ -409,8 +409,7 @@ def construct_watcher(target_info) # The file might be rotated or removed after collecting paths, so check inode again here. begin - ino = Fluent::FileWrapper.stat(path).ino - target_info.ino = ino + target_info.ino = Fluent::FileWrapper.stat(path).ino rescue Errno::ENOENT, Errno::EACCES $log.warn "stat() for #{path} failed. Continuing without tailing it." return @@ -419,7 +418,7 @@ def construct_watcher(target_info) pe = nil if @pf pe = @pf[target_info] - pe.update(ino, 0) if @read_from_head && pe.read_inode.zero? + pe.update(target_info.ino, 0) if @read_from_head && pe.read_inode.zero? end begin