commit 8ba32d37fde13b9464651f16dcf67bb04e5bbdbb
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Sun Nov 18 18:45:46 2007 -0500
patch unionfs-port-odf-to-2-6-24-rc2.patch
diff --git a/fs/exportfs/expfs.c b/fs/exportfs/expfs.c
index 109ab5e..9e861b2 100644
--- a/fs/exportfs/expfs.c
+++ b/fs/exportfs/expfs.c
@@ -22,8 +22,8 @@ static int get_name(struct vfsmount *mnt, struct dentry
*dentry, char *name,
struct dentry *child);
-static int exportfs_get_name(struct vfsmount *mnt, struct dentry *dir,
- char *name, struct dentry *child)
+int exportfs_get_name(struct vfsmount *mnt, struct dentry *dir,
+ char *name, struct dentry *child)
{
const struct export_operations *nop = dir->d_sb->s_export_op;
@@ -32,6 +32,7 @@ static int exportfs_get_name(struct vfsmount *mnt, struct
dentry *dir,
else
return get_name(mnt, dir, name, child);
}
+EXPORT_SYMBOL_GPL(exportfs_get_name);
/*
* Check if the dentry or any of it's aliases is acceptable.
diff --git a/fs/unionfs/export.c b/fs/unionfs/export.c
index 44493e9..0e1db37 100644
--- a/fs/unionfs/export.c
+++ b/fs/unionfs/export.c
@@ -14,8 +14,6 @@
#define is_anon(d) ((d)->d_flags & DCACHE_DISCONNECTED)
-extern struct export_operations export_op_default;
-
static struct dentry *__get_parent(struct super_block *sb,
struct dentry *odf_dentry)
{
@@ -99,10 +97,23 @@ static struct dentry *__get_parent(struct super_block *sb,
res = odf_root->d_sb->s_export_op->get_name(
UNIONFS_D(parent)->odf.dentry,
name, d);
- else
- res = export_op_default.get_name(
+ else {
+ res = exportfs_get_name(
+ NULL, /* NULL mnt is wrong! */
UNIONFS_D(parent)->odf.dentry,
name, d);
+ BUG();
+ /*
+ * FIXME: we're passing a null mnt above,
+ * which is wrong. We need to pass a real
+ * mnt. But first, we need to change struct
+ * odf_dentry_info so that it'll record a
+ * struct path instead of just a dentry.
+ * That struct path will include both a
+ * dentry and mnt, which have to be dget/put
+ * and mntget/put properly. -ezk
+ */
+ }
}
else
strncpy(name, d->d_name.name, d->d_name.len);
diff --git a/fs/unionfs/union.h b/fs/unionfs/union.h
index f6bf4a3..a2f12b9 100644
--- a/fs/unionfs/union.h
+++ b/fs/unionfs/union.h
@@ -46,6 +46,7 @@
#include <linux/poison.h>
#include <linux/mman.h>
#include <linux/backing-dev.h>
+#include <linux/exportfs.h>
#include <asm/system.h>
diff --git a/include/linux/exportfs.h b/include/linux/exportfs.h
index 51d2141..33010f4 100644
--- a/include/linux/exportfs.h
+++ b/include/linux/exportfs.h
@@ -117,6 +117,8 @@ extern int exportfs_encode_fh(struct dentry *dentry, struct
fid *fid,
extern struct dentry *exportfs_decode_fh(struct vfsmount *mnt, struct fid *fid,
int fh_len, int fileid_type, int (*acceptable)(void *, struct dentry *),
void *context);
+extern int exportfs_get_name(struct vfsmount *mnt, struct dentry *dir,
+ char *name, struct dentry *child);
/*
* Generic helpers for filesystems.
_______________________________________________
unionfs-cvs mailing list: http://unionfs.filesystems.org/
[email protected]
http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs-cvs