/* This is the unlink() entry in the inode_operations structure for regular HFS directories. The purpose is to delete an existing file, given the inode for the parent directory and the name (and its length) of the existing file.  */
static int hfs_unlink(struct inode *dir, struct dentry *dentry)
/* This is the unlink() entry in the inode_operations structure for regular HFS directories. The purpose is to delete an existing file, given the inode for the parent directory and the name (and its length) of the existing file.  */
static int hfs_unlink(struct inode *dir, struct dentry *dentry)
{
	struct inode *inode;
	int res;
	inode = dentry->d_inode;
	res = hfs_cat_delete(inode->i_ino, dir, &dentry->d_name);
	if (res)
		return res;
	drop_nlink(inode);
	hfs_delete_inode(inode);
	inode->i_ctime = CURRENT_TIME_SEC;
	mark_inode_dirty(inode);
	return res;
}