]> wimlib.net Git - wimlib/commitdiff
Remove link_dentry()
authorEric Biggers <ebiggers3@gmail.com>
Mon, 12 Nov 2012 01:44:26 +0000 (19:44 -0600)
committerEric Biggers <ebiggers3@gmail.com>
Mon, 12 Nov 2012 01:44:26 +0000 (19:44 -0600)
Replaced with dentry_add_child().

src/dentry.h
src/modify.c
src/mount.c
src/ntfs-capture.c

index a68f07530930f321999f015b7c572a5c6a3cad1f..841c9ca935bda23c420bff4b841cb099b7e4a222 100644 (file)
@@ -374,9 +374,6 @@ extern void unlink_dentry(struct dentry *dentry);
 extern bool dentry_add_child(struct dentry * restrict parent,
                             struct dentry * restrict child);
 
 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);
 
 
 extern int verify_dentry(struct dentry *dentry, void *wim);
 
 
index 9b564bd8d5531399003dfd6cff6c8d86c03f4d29..7fc1a6cfe4f21eca877a581b0b5601a9a4aa3d85 100644 (file)
@@ -196,7 +196,7 @@ static int build_dentry_tree(struct dentry **root_ret,
                        if (ret != 0)
                                break;
                        if (child)
                        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 */
                }
                closedir(dir);
        } else if (dentry_is_symlink(root)) { /* Archiving a symbolic link */
index 834d5855303d7b42c59f3afa71e2696980312c99..e10287a6f58aa918aaa06852ba31b9a3ab1d5e25 100644 (file)
@@ -1086,7 +1086,7 @@ static int wimfs_link(const char *to, const char *from)
                        lte->refcnt++;
        }
 
                        lte->refcnt++;
        }
 
-       link_dentry(from_dentry, from_dentry_parent);
+       dentry_add_child(from_dentry_parent, from_dentry);
        return 0;
 }
 
        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++;
        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;
 }
 
        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++;
                        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;
 }
        }
        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);
        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;
 }
 
        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;
 
        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);
        return 0;
 out_free_dentry:
        free_dentry(dentry);
index a4f0b6ed7c2ce0e6748fa6100bb85817c7c24832..b47f437e19e392bd8e21ac9b206dfb9b868d5136 100644 (file)
@@ -463,7 +463,7 @@ static int wim_ntfs_capture_filldir(void *dirent, const ntfschar *name,
                                               ctx->flags);
 
        if (child)
                                               ctx->flags);
 
        if (child)
-               link_dentry(child, ctx->parent);
+               dentry_add_child(ctx->parent, child);
 
        ntfs_inode_close(ni);
 out_free_utf8_name:
 
        ntfs_inode_close(ni);
 out_free_utf8_name: