Files
linux-apfs/fs/hfsplus/dir.c
T

572 lines
14 KiB
C
Raw Normal View History

2005-04-16 15:20:36 -07:00
/*
* linux/fs/hfsplus/dir.c
*
* Copyright (C) 2001
* Brad Boyer (flar@allandria.com)
* (C) 2003 Ardis Technologies <roman@ardistech.com>
*
* Handling of directories
*/
#include <linux/errno.h>
#include <linux/fs.h>
#include <linux/slab.h>
#include <linux/random.h>
#include <linux/nls.h>
2005-04-16 15:20:36 -07:00
#include "hfsplus_fs.h"
#include "hfsplus_raw.h"
#include "xattr.h"
#include "acl.h"
2005-04-16 15:20:36 -07:00
static inline void hfsplus_instantiate(struct dentry *dentry,
struct inode *inode, u32 cnid)
{
dentry->d_fsdata = (void *)(unsigned long)cnid;
d_instantiate(dentry, inode);
}
/* Find the entry inside dir named dentry->d_name */
static struct dentry *hfsplus_lookup(struct inode *dir, struct dentry *dentry,
2012-06-10 17:13:09 -04:00
unsigned int flags)
2005-04-16 15:20:36 -07:00
{
struct inode *inode = NULL;
struct hfs_find_data fd;
struct super_block *sb;
hfsplus_cat_entry entry;
int err;
u32 cnid, linkid = 0;
u16 type;
sb = dir->i_sb;
2005-04-16 15:20:36 -07:00
dentry->d_fsdata = NULL;
err = hfs_find_init(HFSPLUS_SB(sb)->cat_tree, &fd);
if (err)
return ERR_PTR(err);
2005-04-16 15:20:36 -07:00
hfsplus_cat_build_key(sb, fd.search_key, dir->i_ino, &dentry->d_name);
again:
err = hfs_brec_read(&fd, &entry, sizeof(entry));
if (err) {
if (err == -ENOENT) {
hfs_find_exit(&fd);
/* No such entry */
inode = NULL;
goto out;
}
goto fail;
}
type = be16_to_cpu(entry.type);
if (type == HFSPLUS_FOLDER) {
if (fd.entrylength < sizeof(struct hfsplus_cat_folder)) {
err = -EIO;
goto fail;
}
cnid = be32_to_cpu(entry.folder.id);
dentry->d_fsdata = (void *)(unsigned long)cnid;
} else if (type == HFSPLUS_FILE) {
if (fd.entrylength < sizeof(struct hfsplus_cat_file)) {
err = -EIO;
goto fail;
}
cnid = be32_to_cpu(entry.file.id);
2010-12-16 18:08:38 +02:00
if (entry.file.user_info.fdType ==
cpu_to_be32(HFSP_HARDLINK_TYPE) &&
entry.file.user_info.fdCreator ==
cpu_to_be32(HFSP_HFSPLUS_CREATOR) &&
(entry.file.create_date ==
HFSPLUS_I(HFSPLUS_SB(sb)->hidden_dir)->
create_date ||
entry.file.create_date ==
HFSPLUS_I(sb->s_root->d_inode)->
create_date) &&
HFSPLUS_SB(sb)->hidden_dir) {
2005-04-16 15:20:36 -07:00
struct qstr str;
char name[32];
if (dentry->d_fsdata) {
/*
* We found a link pointing to another link,
* so ignore it and treat it as regular file.
*/
cnid = (unsigned long)dentry->d_fsdata;
linkid = 0;
} else {
dentry->d_fsdata = (void *)(unsigned long)cnid;
2010-12-16 18:08:38 +02:00
linkid =
be32_to_cpu(entry.file.permissions.dev);
str.len = sprintf(name, "iNode%d", linkid);
str.name = name;
2010-10-01 05:42:59 +02:00
hfsplus_cat_build_key(sb, fd.search_key,
2010-12-16 18:08:38 +02:00
HFSPLUS_SB(sb)->hidden_dir->i_ino,
&str);
goto again;
2005-04-16 15:20:36 -07:00
}
} else if (!dentry->d_fsdata)
dentry->d_fsdata = (void *)(unsigned long)cnid;
} else {
2013-04-30 15:27:55 -07:00
pr_err("invalid catalog entry type in lookup\n");
2005-04-16 15:20:36 -07:00
err = -EIO;
goto fail;
}
hfs_find_exit(&fd);
inode = hfsplus_iget(dir->i_sb, cnid);
if (IS_ERR(inode))
return ERR_CAST(inode);
2005-04-16 15:20:36 -07:00
if (S_ISREG(inode->i_mode))
2010-10-14 09:54:28 -04:00
HFSPLUS_I(inode)->linkid = linkid;
2005-04-16 15:20:36 -07:00
out:
d_add(dentry, inode);
return NULL;
fail:
hfs_find_exit(&fd);
return ERR_PTR(err);
}
2013-05-22 14:59:39 -04:00
static int hfsplus_readdir(struct file *file, struct dir_context *ctx)
2005-04-16 15:20:36 -07:00
{
2013-05-22 14:59:39 -04:00
struct inode *inode = file_inode(file);
2005-04-16 15:20:36 -07:00
struct super_block *sb = inode->i_sb;
int len, err;
char *strbuf;
2005-04-16 15:20:36 -07:00
hfsplus_cat_entry entry;
struct hfs_find_data fd;
struct hfsplus_readdir_data *rd;
u16 type;
2013-05-22 14:59:39 -04:00
if (file->f_pos >= inode->i_size)
2005-04-16 15:20:36 -07:00
return 0;
err = hfs_find_init(HFSPLUS_SB(sb)->cat_tree, &fd);
if (err)
return err;
strbuf = kmalloc(NLS_MAX_CHARSET_SIZE * HFSPLUS_MAX_STRLEN + 1, GFP_KERNEL);
if (!strbuf) {
err = -ENOMEM;
goto out;
}
2005-04-16 15:20:36 -07:00
hfsplus_cat_build_key(sb, fd.search_key, inode->i_ino, NULL);
err = hfs_brec_find(&fd, hfs_find_rec_by_key);
2005-04-16 15:20:36 -07:00
if (err)
goto out;
2013-05-22 14:59:39 -04:00
if (ctx->pos == 0) {
2005-04-16 15:20:36 -07:00
/* This is completely artificial... */
2013-05-22 14:59:39 -04:00
if (!dir_emit_dot(file, ctx))
2005-04-16 15:20:36 -07:00
goto out;
2013-05-22 14:59:39 -04:00
ctx->pos = 1;
}
if (ctx->pos == 1) {
2012-05-04 12:09:39 -07:00
if (fd.entrylength > sizeof(entry) || fd.entrylength < 0) {
err = -EIO;
goto out;
}
2010-12-16 18:08:38 +02:00
hfs_bnode_read(fd.bnode, &entry, fd.entryoffset,
fd.entrylength);
2005-04-16 15:20:36 -07:00
if (be16_to_cpu(entry.type) != HFSPLUS_FOLDER_THREAD) {
2013-04-30 15:27:55 -07:00
pr_err("bad catalog folder thread\n");
2005-04-16 15:20:36 -07:00
err = -EIO;
goto out;
}
if (fd.entrylength < HFSPLUS_MIN_THREAD_SZ) {
2013-04-30 15:27:55 -07:00
pr_err("truncated catalog thread\n");
2005-04-16 15:20:36 -07:00
err = -EIO;
goto out;
}
2013-05-22 14:59:39 -04:00
if (!dir_emit(ctx, "..", 2,
2005-04-16 15:20:36 -07:00
be32_to_cpu(entry.thread.parentID), DT_DIR))
goto out;
2013-05-22 14:59:39 -04:00
ctx->pos = 2;
2005-04-16 15:20:36 -07:00
}
2013-05-22 14:59:39 -04:00
if (ctx->pos >= inode->i_size)
goto out;
err = hfs_brec_goto(&fd, ctx->pos - 1);
if (err)
goto out;
2005-04-16 15:20:36 -07:00
for (;;) {
if (be32_to_cpu(fd.key->cat.parent) != inode->i_ino) {
2013-04-30 15:27:55 -07:00
pr_err("walked past end of dir\n");
2005-04-16 15:20:36 -07:00
err = -EIO;
goto out;
}
2012-05-04 12:09:39 -07:00
if (fd.entrylength > sizeof(entry) || fd.entrylength < 0) {
err = -EIO;
goto out;
}
2010-12-16 18:08:38 +02:00
hfs_bnode_read(fd.bnode, &entry, fd.entryoffset,
fd.entrylength);
2005-04-16 15:20:36 -07:00
type = be16_to_cpu(entry.type);
len = NLS_MAX_CHARSET_SIZE * HFSPLUS_MAX_STRLEN;
2005-04-16 15:20:36 -07:00
err = hfsplus_uni2asc(sb, &fd.key->cat.name, strbuf, &len);
if (err)
goto out;
if (type == HFSPLUS_FOLDER) {
2010-12-16 18:08:38 +02:00
if (fd.entrylength <
sizeof(struct hfsplus_cat_folder)) {
2013-04-30 15:27:55 -07:00
pr_err("small dir entry\n");
2005-04-16 15:20:36 -07:00
err = -EIO;
goto out;
}
2010-10-01 05:42:59 +02:00
if (HFSPLUS_SB(sb)->hidden_dir &&
HFSPLUS_SB(sb)->hidden_dir->i_ino ==
be32_to_cpu(entry.folder.id))
2005-04-16 15:20:36 -07:00
goto next;
2013-05-22 14:59:39 -04:00
if (!dir_emit(ctx, strbuf, len,
2005-04-16 15:20:36 -07:00
be32_to_cpu(entry.folder.id), DT_DIR))
break;
} else if (type == HFSPLUS_FILE) {
2014-06-06 14:36:24 -07:00
u16 mode;
unsigned type = DT_UNKNOWN;
2005-04-16 15:20:36 -07:00
if (fd.entrylength < sizeof(struct hfsplus_cat_file)) {
2013-04-30 15:27:55 -07:00
pr_err("small file entry\n");
2005-04-16 15:20:36 -07:00
err = -EIO;
goto out;
}
2014-06-06 14:36:24 -07:00
mode = be16_to_cpu(entry.file.permissions.mode);
if (S_ISREG(mode))
type = DT_REG;
else if (S_ISLNK(mode))
type = DT_LNK;
else if (S_ISFIFO(mode))
type = DT_FIFO;
else if (S_ISCHR(mode))
type = DT_CHR;
else if (S_ISBLK(mode))
type = DT_BLK;
else if (S_ISSOCK(mode))
type = DT_SOCK;
2013-05-22 14:59:39 -04:00
if (!dir_emit(ctx, strbuf, len,
2014-06-06 14:36:24 -07:00
be32_to_cpu(entry.file.id), type))
2005-04-16 15:20:36 -07:00
break;
} else {
2013-04-30 15:27:55 -07:00
pr_err("bad catalog entry type\n");
2005-04-16 15:20:36 -07:00
err = -EIO;
goto out;
}
2010-12-16 18:08:40 +02:00
next:
2013-05-22 14:59:39 -04:00
ctx->pos++;
if (ctx->pos >= inode->i_size)
2005-04-16 15:20:36 -07:00
goto out;
err = hfs_brec_goto(&fd, 1);
if (err)
goto out;
}
2013-05-22 14:59:39 -04:00
rd = file->private_data;
2005-04-16 15:20:36 -07:00
if (!rd) {
rd = kmalloc(sizeof(struct hfsplus_readdir_data), GFP_KERNEL);
if (!rd) {
err = -ENOMEM;
goto out;
}
2013-05-22 14:59:39 -04:00
file->private_data = rd;
rd->file = file;
2010-10-01 05:43:31 +02:00
list_add(&rd->list, &HFSPLUS_I(inode)->open_dir_list);
2005-04-16 15:20:36 -07:00
}
memcpy(&rd->key, fd.key, sizeof(struct hfsplus_cat_key));
out:
kfree(strbuf);
2005-04-16 15:20:36 -07:00
hfs_find_exit(&fd);
return err;
}
static int hfsplus_dir_release(struct inode *inode, struct file *file)
{
struct hfsplus_readdir_data *rd = file->private_data;
if (rd) {
mutex_lock(&inode->i_mutex);
2005-04-16 15:20:36 -07:00
list_del(&rd->list);
mutex_unlock(&inode->i_mutex);
2005-04-16 15:20:36 -07:00
kfree(rd);
}
return 0;
}
static int hfsplus_link(struct dentry *src_dentry, struct inode *dst_dir,
struct dentry *dst_dentry)
{
2010-10-01 05:42:59 +02:00
struct hfsplus_sb_info *sbi = HFSPLUS_SB(dst_dir->i_sb);
2005-04-16 15:20:36 -07:00
struct inode *inode = src_dentry->d_inode;
struct inode *src_dir = src_dentry->d_parent->d_inode;
struct qstr str;
char name[32];
u32 cnid, id;
int res;
if (HFSPLUS_IS_RSRC(inode))
return -EPERM;
2010-10-14 09:54:28 -04:00
if (!S_ISREG(inode->i_mode))
return -EPERM;
2005-04-16 15:20:36 -07:00
mutex_lock(&sbi->vh_mutex);
2005-04-16 15:20:36 -07:00
if (inode->i_ino == (u32)(unsigned long)src_dentry->d_fsdata) {
for (;;) {
get_random_bytes(&id, sizeof(cnid));
id &= 0x3fffffff;
str.name = name;
str.len = sprintf(name, "iNode%d", id);
res = hfsplus_rename_cat(inode->i_ino,
src_dir, &src_dentry->d_name,
2010-10-01 05:42:59 +02:00
sbi->hidden_dir, &str);
2005-04-16 15:20:36 -07:00
if (!res)
break;
if (res != -EEXIST)
goto out;
2005-04-16 15:20:36 -07:00
}
2010-10-14 09:54:28 -04:00
HFSPLUS_I(inode)->linkid = id;
2010-10-01 05:42:59 +02:00
cnid = sbi->next_cnid++;
2005-04-16 15:20:36 -07:00
src_dentry->d_fsdata = (void *)(unsigned long)cnid;
2010-12-16 18:08:38 +02:00
res = hfsplus_create_cat(cnid, src_dir,
&src_dentry->d_name, inode);
2005-04-16 15:20:36 -07:00
if (res)
/* panic? */
goto out;
2010-10-01 05:42:59 +02:00
sbi->file_count++;
2005-04-16 15:20:36 -07:00
}
2010-10-01 05:42:59 +02:00
cnid = sbi->next_cnid++;
2005-04-16 15:20:36 -07:00
res = hfsplus_create_cat(cnid, dst_dir, &dst_dentry->d_name, inode);
if (res)
goto out;
2005-04-16 15:20:36 -07:00
inc_nlink(inode);
2005-04-16 15:20:36 -07:00
hfsplus_instantiate(dst_dentry, inode, cnid);
2010-10-23 11:11:40 -04:00
ihold(inode);
2005-04-16 15:20:36 -07:00
inode->i_ctime = CURRENT_TIME_SEC;
mark_inode_dirty(inode);
2010-10-01 05:42:59 +02:00
sbi->file_count++;
2012-07-12 17:26:31 +03:00
hfsplus_mark_mdb_dirty(dst_dir->i_sb);
out:
mutex_unlock(&sbi->vh_mutex);
return res;
2005-04-16 15:20:36 -07:00
}
static int hfsplus_unlink(struct inode *dir, struct dentry *dentry)
{
2010-10-01 05:42:59 +02:00
struct hfsplus_sb_info *sbi = HFSPLUS_SB(dir->i_sb);
2005-04-16 15:20:36 -07:00
struct inode *inode = dentry->d_inode;
struct qstr str;
char name[32];
u32 cnid;
int res;
if (HFSPLUS_IS_RSRC(inode))
return -EPERM;
mutex_lock(&sbi->vh_mutex);
2005-04-16 15:20:36 -07:00
cnid = (u32)(unsigned long)dentry->d_fsdata;
if (inode->i_ino == cnid &&
2010-10-01 05:43:31 +02:00
atomic_read(&HFSPLUS_I(inode)->opencnt)) {
2005-04-16 15:20:36 -07:00
str.name = name;
str.len = sprintf(name, "temp%lu", inode->i_ino);
res = hfsplus_rename_cat(inode->i_ino,
dir, &dentry->d_name,
2010-10-01 05:42:59 +02:00
sbi->hidden_dir, &str);
if (!res) {
2005-04-16 15:20:36 -07:00
inode->i_flags |= S_DEAD;
drop_nlink(inode);
}
goto out;
2005-04-16 15:20:36 -07:00
}
res = hfsplus_delete_cat(cnid, dir, &dentry->d_name);
if (res)
goto out;
2005-04-16 15:20:36 -07:00
if (inode->i_nlink > 0)
drop_nlink(inode);
2008-04-09 17:44:07 +02:00
if (inode->i_ino == cnid)
clear_nlink(inode);
2008-04-09 17:44:07 +02:00
if (!inode->i_nlink) {
if (inode->i_ino != cnid) {
2010-10-01 05:42:59 +02:00
sbi->file_count--;
2010-10-01 05:43:31 +02:00
if (!atomic_read(&HFSPLUS_I(inode)->opencnt)) {
2008-04-09 17:44:07 +02:00
res = hfsplus_delete_cat(inode->i_ino,
2010-10-01 05:42:59 +02:00
sbi->hidden_dir,
2008-04-09 17:44:07 +02:00
NULL);
if (!res)
hfsplus_delete_inode(inode);
} else
inode->i_flags |= S_DEAD;
} else
hfsplus_delete_inode(inode);
} else
2010-10-01 05:42:59 +02:00
sbi->file_count--;
2005-04-16 15:20:36 -07:00
inode->i_ctime = CURRENT_TIME_SEC;
mark_inode_dirty(inode);
out:
mutex_unlock(&sbi->vh_mutex);
2005-04-16 15:20:36 -07:00
return res;
}
static int hfsplus_rmdir(struct inode *dir, struct dentry *dentry)
{
struct hfsplus_sb_info *sbi = HFSPLUS_SB(dir->i_sb);
struct inode *inode = dentry->d_inode;
2005-04-16 15:20:36 -07:00
int res;
if (inode->i_size != 2)
return -ENOTEMPTY;
mutex_lock(&sbi->vh_mutex);
2005-04-16 15:20:36 -07:00
res = hfsplus_delete_cat(inode->i_ino, dir, &dentry->d_name);
if (res)
goto out;
clear_nlink(inode);
2005-04-16 15:20:36 -07:00
inode->i_ctime = CURRENT_TIME_SEC;
hfsplus_delete_inode(inode);
mark_inode_dirty(inode);
out:
mutex_unlock(&sbi->vh_mutex);
return res;
2005-04-16 15:20:36 -07:00
}
static int hfsplus_symlink(struct inode *dir, struct dentry *dentry,
const char *symname)
{
struct hfsplus_sb_info *sbi = HFSPLUS_SB(dir->i_sb);
2005-04-16 15:20:36 -07:00
struct inode *inode;
int res = -ENOSPC;
2005-04-16 15:20:36 -07:00
mutex_lock(&sbi->vh_mutex);
inode = hfsplus_new_inode(dir->i_sb, S_IFLNK | S_IRWXUGO);
2005-04-16 15:20:36 -07:00
if (!inode)
goto out;
2005-04-16 15:20:36 -07:00
res = page_symlink(inode, symname, strlen(symname) + 1);
if (res)
goto out_err;
2005-04-16 15:20:36 -07:00
res = hfsplus_create_cat(inode->i_ino, dir, &dentry->d_name, inode);
if (res)
goto out_err;
2005-04-16 15:20:36 -07:00
res = hfsplus_init_inode_security(inode, dir, &dentry->d_name);
if (res == -EOPNOTSUPP)
res = 0; /* Operation is not supported. */
else if (res) {
/* Try to delete anyway without error analysis. */
hfsplus_delete_cat(inode->i_ino, dir, &dentry->d_name);
goto out_err;
}
hfsplus_instantiate(dentry, inode, inode->i_ino);
mark_inode_dirty(inode);
goto out;
2005-04-16 15:20:36 -07:00
out_err:
2011-10-28 14:13:28 +02:00
clear_nlink(inode);
hfsplus_delete_inode(inode);
iput(inode);
out:
mutex_unlock(&sbi->vh_mutex);
2005-04-16 15:20:36 -07:00
return res;
}
static int hfsplus_mknod(struct inode *dir, struct dentry *dentry,
2011-07-26 01:52:52 -04:00
umode_t mode, dev_t rdev)
2005-04-16 15:20:36 -07:00
{
struct hfsplus_sb_info *sbi = HFSPLUS_SB(dir->i_sb);
2005-04-16 15:20:36 -07:00
struct inode *inode;
int res = -ENOSPC;
2005-04-16 15:20:36 -07:00
mutex_lock(&sbi->vh_mutex);
2010-10-01 05:43:50 +02:00
inode = hfsplus_new_inode(dir->i_sb, mode);
2005-04-16 15:20:36 -07:00
if (!inode)
goto out;
2005-04-16 15:20:36 -07:00
if (S_ISBLK(mode) || S_ISCHR(mode) || S_ISFIFO(mode) || S_ISSOCK(mode))
init_special_inode(inode, mode, rdev);
2005-04-16 15:20:36 -07:00
res = hfsplus_create_cat(inode->i_ino, dir, &dentry->d_name, inode);
if (res)
goto failed_mknod;
res = hfsplus_init_inode_security(inode, dir, &dentry->d_name);
if (res == -EOPNOTSUPP)
res = 0; /* Operation is not supported. */
else if (res) {
/* Try to delete anyway without error analysis. */
hfsplus_delete_cat(inode->i_ino, dir, &dentry->d_name);
goto failed_mknod;
2005-04-16 15:20:36 -07:00
}
2010-10-01 05:43:50 +02:00
2005-04-16 15:20:36 -07:00
hfsplus_instantiate(dentry, inode, inode->i_ino);
mark_inode_dirty(inode);
goto out;
failed_mknod:
clear_nlink(inode);
hfsplus_delete_inode(inode);
iput(inode);
out:
mutex_unlock(&sbi->vh_mutex);
return res;
2005-04-16 15:20:36 -07:00
}
2011-07-26 01:42:34 -04:00
static int hfsplus_create(struct inode *dir, struct dentry *dentry, umode_t mode,
2012-06-10 18:05:36 -04:00
bool excl)
2010-10-01 05:43:50 +02:00
{
return hfsplus_mknod(dir, dentry, mode, 0);
}
2011-07-26 01:41:39 -04:00
static int hfsplus_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
2010-10-01 05:43:50 +02:00
{
return hfsplus_mknod(dir, dentry, mode | S_IFDIR, 0);
}
2005-04-16 15:20:36 -07:00
static int hfsplus_rename(struct inode *old_dir, struct dentry *old_dentry,
struct inode *new_dir, struct dentry *new_dentry)
{
int res;
/* Unlink destination if it already exists */
if (new_dentry->d_inode) {
if (S_ISDIR(new_dentry->d_inode->i_mode))
2010-10-01 09:12:08 +02:00
res = hfsplus_rmdir(new_dir, new_dentry);
else
2010-10-01 09:12:08 +02:00
res = hfsplus_unlink(new_dir, new_dentry);
2005-04-16 15:20:36 -07:00
if (res)
return res;
}
res = hfsplus_rename_cat((u32)(unsigned long)old_dentry->d_fsdata,
old_dir, &old_dentry->d_name,
new_dir, &new_dentry->d_name);
if (!res)
new_dentry->d_fsdata = old_dentry->d_fsdata;
return res;
}
const struct inode_operations hfsplus_dir_inode_operations = {
.lookup = hfsplus_lookup,
.create = hfsplus_create,
.link = hfsplus_link,
.unlink = hfsplus_unlink,
.mkdir = hfsplus_mkdir,
.rmdir = hfsplus_rmdir,
.symlink = hfsplus_symlink,
.mknod = hfsplus_mknod,
.rename = hfsplus_rename,
.setxattr = generic_setxattr,
.getxattr = generic_getxattr,
.listxattr = hfsplus_listxattr,
2014-01-29 23:59:19 -08:00
.removexattr = generic_removexattr,
#ifdef CONFIG_HFSPLUS_FS_POSIX_ACL
.get_acl = hfsplus_get_posix_acl,
.set_acl = hfsplus_set_posix_acl,
#endif
2005-04-16 15:20:36 -07:00
};
const struct file_operations hfsplus_dir_operations = {
2010-11-23 14:38:10 +01:00
.fsync = hfsplus_file_fsync,
2005-04-16 15:20:36 -07:00
.read = generic_read_dir,
2013-05-22 14:59:39 -04:00
.iterate = hfsplus_readdir,
2010-04-27 16:24:20 +02:00
.unlocked_ioctl = hfsplus_ioctl,
2005-04-16 15:20:36 -07:00
.llseek = generic_file_llseek,
.release = hfsplus_dir_release,
};