commit 611104b347c1444ee7afeaa2bf3272be19327708
Author: Yiannis Pericleous <[EMAIL PROTECTED]>
Date: Tue May 29 21:58:03 2007 -0400
renamed dentry stack functions
diff --git a/fs/unionfs/dirhelper.c b/fs/unionfs/dirhelper.c
index 0b0a625..86455f2 100644
--- a/fs/unionfs/dirhelper.c
+++ b/fs/unionfs/dirhelper.c
@@ -26,7 +26,7 @@
#define STACK_SIZE 64 /* initial size of the dentry stack */
/* reallocs at double the size */
-int __ds_resize(struct dentry_stack *stack)
+int __odf_dstack_resize(struct dentry_stack *stack)
{
struct dentry **new_stack;
int new_sz = stack->size * 2;
@@ -119,7 +119,7 @@ static int cleanup_util_callback(void *dirent, const char
*name, int namelen,
goto out;
}
BUG_ON(!dentry->d_inode);
- err = __ds_push(buf->stack, dentry);
+ err = __odf_dstack_push(buf->stack, dentry);
}
out:
buf->err = err;
@@ -572,7 +572,7 @@ int odf_cleanup(struct odf_sb_info *odf, int mode, u64
b_to_free, u64 i_to_free)
loff_t bytes, isize;
int blocks;
- __ds_init(&stack, STACK_SIZE);
+ __odf_dstack_init(&stack, STACK_SIZE);
if (!stack.item) {
err = -ENOMEM;
goto out;
@@ -599,7 +599,7 @@ cleanup_loop:
* odf/reclaim and pushing to the stack all directories
*/
while (err >= 0 && stack.n > 0 && !success) {
- dentry = __ds_pop(&stack);
+ dentry = __odf_dstack_pop(&stack);
/* we need to dget /odf/reclaim and /odf/sr dirs again since
* we need them after we close the file
@@ -683,7 +683,7 @@ cleanup_loop:
out:
BUG_ON(stack.n < 0);
while(stack.n)
- dput(__ds_pop(&stack));
+ dput(__odf_dstack_pop(&stack));
kfree(buf);
kfree(stack.item);
diff --git a/fs/unionfs/export.c b/fs/unionfs/export.c
index 403240e..c95d522 100644
--- a/fs/unionfs/export.c
+++ b/fs/unionfs/export.c
@@ -24,7 +24,7 @@ static struct dentry *__get_parent(struct super_block *sb,
struct dentry *odf_de
/* unionfs_get_parent already checks for this */
BUG_ON(!odf_root->d_sb->s_export_op ||
!odf_root->d_sb->s_export_op->get_parent);
- __ds_init(&stack, 8);
+ __odf_dstack_init(&stack, 8);
if (!stack.item)
return ERR_PTR(-ENOMEM);
@@ -35,7 +35,7 @@ static struct dentry *__get_parent(struct super_block *sb,
struct dentry *odf_de
d = odf_dentry;
do {
BUG_ON(!d);
- __ds_push(&stack, d);
+ __odf_dstack_push(&stack, d);
if (!is_anon(d)) {
d = d->d_parent;
if (d != odf_root)
@@ -62,7 +62,7 @@ static struct dentry *__get_parent(struct super_block *sb,
struct dentry *odf_de
parent = sb->s_root;
dget(parent);
while (stack.n) {
- d = __ds_pop(&stack);
+ d = __odf_dstack_pop(&stack);
memset(name, 0, NAME_MAX + 1);
if (is_anon(d)) {
@@ -104,7 +104,7 @@ static struct dentry *__get_parent(struct super_block *sb,
struct dentry *odf_de
out:
BUG_ON(stack.n < 0);
while(stack.n)
- dput(__ds_pop(&stack));
+ dput(__odf_dstack_pop(&stack));
kfree(stack.item);
kfree(name);
return child;
diff --git a/fs/unionfs/union.h b/fs/unionfs/union.h
index 056a07d..a150283 100644
--- a/fs/unionfs/union.h
+++ b/fs/unionfs/union.h
@@ -524,24 +524,24 @@ struct dentry_stack {
int size;
};
-int __ds_resize(struct dentry_stack *stack);
+int __odf_dstack_resize(struct dentry_stack *stack);
-static inline void __ds_init(struct dentry_stack *stack, int size)
+static inline void __odf_dstack_init(struct dentry_stack *stack, int size)
{
stack->size = size;
stack->n = 0;
stack->item = kmalloc(stack->size * sizeof(struct dentry *),
GFP_KERNEL);
}
-static inline int __ds_push(struct dentry_stack *stack, struct dentry *dentry)
+static inline int __odf_dstack_push(struct dentry_stack *stack, struct dentry
*dentry)
{
stack->item[stack->n++] = dentry;
if (stack->n == stack->size)
- return __ds_resize(stack);
+ return __odf_dstack_resize(stack);
return 0;
}
-static inline struct dentry *__ds_pop(struct dentry_stack *stack)
+static inline struct dentry *__odf_dstack_pop(struct dentry_stack *stack)
{
return stack->item[--stack->n];
}
_______________________________________________
unionfs-cvs mailing list: http://unionfs.filesystems.org/
[email protected]
http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs-cvs