From 45c3ad86e44a05a169bfb1fa8ff318861bbf9fbf Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Sun, 11 Nov 2012 19:44:26 -0600 Subject: [PATCH] Remove link_dentry() Replaced with dentry_add_child(). --- src/dentry.h | 3 --- src/modify.c | 2 +- src/mount.c | 10 +++++----- src/ntfs-capture.c | 2 +- 4 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/dentry.h b/src/dentry.h index a68f0753..841c9ca9 100644 --- a/src/dentry.h +++ b/src/dentry.h @@ -374,9 +374,6 @@ extern void unlink_dentry(struct dentry *dentry); extern bool dentry_add_child(struct dentry * restrict parent, struct dentry * restrict child); -// XXX -#define link_dentry(child, parent) dentry_add_child(parent, child) - extern int verify_dentry(struct dentry *dentry, void *wim); diff --git a/src/modify.c b/src/modify.c index 9b564bd8..7fc1a6cf 100644 --- a/src/modify.c +++ b/src/modify.c @@ -196,7 +196,7 @@ static int build_dentry_tree(struct dentry **root_ret, if (ret != 0) break; if (child) - link_dentry(child, root); + dentry_add_child(root, child); } closedir(dir); } else if (dentry_is_symlink(root)) { /* Archiving a symbolic link */ diff --git a/src/mount.c b/src/mount.c index 834d5855..e10287a6 100644 --- a/src/mount.c +++ b/src/mount.c @@ -1086,7 +1086,7 @@ static int wimfs_link(const char *to, const char *from) lte->refcnt++; } - link_dentry(from_dentry, from_dentry_parent); + dentry_add_child(from_dentry_parent, from_dentry); return 0; } @@ -1152,7 +1152,7 @@ static int wimfs_mkdir(const char *path, mode_t mode) newdir->d_inode->attributes |= FILE_ATTRIBUTE_DIRECTORY; newdir->d_inode->resolved = true; newdir->d_inode->ino = ctx->next_ino++; - link_dentry(newdir, parent); + dentry_add_child(parent, newdir); return 0; } @@ -1204,7 +1204,7 @@ static int wimfs_mknod(const char *path, mode_t mode, dev_t rdev) return -ENOMEM; dentry->d_inode->resolved = true; dentry->d_inode->ino = ctx->next_ino++; - link_dentry(dentry, parent); + dentry_add_child(parent, dentry); } return 0; } @@ -1491,7 +1491,7 @@ static int wimfs_rename(const char *from, const char *to) src->file_name_utf8_len = file_name_utf8_len; unlink_dentry(src); - link_dentry(src, parent_of_dst); + dentry_add_child(parent_of_dst, src); return 0; } @@ -1611,7 +1611,7 @@ static int wimfs_symlink(const char *to, const char *from) if (inode_set_symlink(inode, to, ctx->wim->lookup_table, NULL) != 0) goto out_free_dentry; - link_dentry(dentry, dentry_parent); + dentry_add_child(dentry_parent, dentry); return 0; out_free_dentry: free_dentry(dentry); diff --git a/src/ntfs-capture.c b/src/ntfs-capture.c index a4f0b6ed..b47f437e 100644 --- a/src/ntfs-capture.c +++ b/src/ntfs-capture.c @@ -463,7 +463,7 @@ static int wim_ntfs_capture_filldir(void *dirent, const ntfschar *name, ctx->flags); if (child) - link_dentry(child, ctx->parent); + dentry_add_child(ctx->parent, child); ntfs_inode_close(ni); out_free_utf8_name: -- 2.43.0