fdatasync() followed by fsync() "should" do it although on very recently created/mounted directories you'll want to use sync() as well.
Luckily sync() is synchronous on Linux (sanity!) even though traditional Unix doesn't require it to be.
So perhaps the article can be shortened to "sync() is not guaranteed to be synchronous on non-Linux Unix."
So perhaps the article can be shortened to "sync() is not guaranteed to be synchronous on non-Linux Unix."