fix races between __d_instantiate() and checks of dentry flags