example/passthrough_hp: Fix . and .. readdir lookup count
authorBernd Schubert <bschubert@ddn.com>
Mon, 29 Jul 2024 23:13:27 +0000 (01:13 +0200)
committerBernd Schubert <bernd.schubert@fastmail.fm>
Tue, 30 Jul 2024 08:53:16 +0000 (10:53 +0200)
commita83041fa1fa40c4cdeeaecb2b16b011d629727c8
treec1de52c593050a859c92bfa44e760d334d2667ed
parentfafe4069d028b99ae937ee75ea2b82bf215392c3
example/passthrough_hp: Fix . and .. readdir lookup count

Commit 170edc6a8ef0 added dot and dotdot (. and ..) to readdir
results, but introduced an issue when max number of entries
was reached - lookup count must not be decreased without
doing the lookup.
With ext4 as underlying file system readir seems to return . and ..
at random offsets and randomly failed xfstests for me.

This also fixes indentation, as passthrough_hp.cc does not follow
the linux indentation style (if we decide to fix this, it needs
to be done for the entire file).

Signed-off-by: Bernd Schubert <bschubert@ddn.com>
example/passthrough_hp.cc