/* it is not safe to log dentry if the chunk root has added new chunks. This returns 0 if the dentry was logged, and 1 otherwise. If this returns 1, you must commit the transaction to safely get your data on disk.  */
int btrfs_log_dentry_safe(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct dentry *dentry)
/* it is not safe to log dentry if the chunk root has added new chunks. This returns 0 if the dentry was logged, and 1 otherwise. If this returns 1, you must commit the transaction to safely get your data on disk.  */
int btrfs_log_dentry_safe(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct dentry *dentry)
{
	return btrfs_log_inode_parent(trans, root, dentry->d_inode,
				      dentry->d_parent, 0);
}