/* write an existing inode back to the directory, and therefore the disk. The adfs-specific inode data has already been updated by adfs_notify_change()  */
int adfs_write_inode(struct inode *inode, int wait)
/* write an existing inode back to the directory, and therefore the disk. The adfs-specific inode data has already been updated by adfs_notify_change()  */
int adfs_write_inode(struct inode *inode, int wait)
{
	struct super_block *sb = inode->i_sb;
	struct object_info obj;
	int ret;
	lock_kernel();
	obj.file_id	= inode->i_ino;
	obj.name_len	= 0;
	obj.parent_id	= ADFS_I(inode)->parent_id;
	obj.loadaddr	= ADFS_I(inode)->loadaddr;
	obj.execaddr	= ADFS_I(inode)->execaddr;
	obj.attr	= ADFS_I(inode)->attr;
	obj.size	= inode->i_size;
	ret = adfs_dir_update(sb, &obj, wait);
	unlock_kernel();
	return ret;
}