mini_fo: More 2.6.38 fixes

SVN-Revision: 25788
This commit is contained in:
Michael Büsch 2011-02-28 15:10:55 +00:00
parent 47370c1fa4
commit 38430ba588

View file

@ -1,5 +1,16 @@
--- a/fs/mini_fo/dentry.c
+++ b/fs/mini_fo/dentry.c
Index: linux-2.6.38-rc6/fs/mini_fo/dentry.c
===================================================================
--- linux-2.6.38-rc6.orig/fs/mini_fo/dentry.c 2011-02-28 15:34:06.542221268 +0100
+++ linux-2.6.38-rc6/fs/mini_fo/dentry.c 2011-02-28 16:05:42.307346739 +0100
@@ -78,7 +78,7 @@ mini_fo_d_revalidate(dentry_t *dentry, i
STATIC int
-mini_fo_d_hash(dentry_t *dentry, qstr_t *name)
+mini_fo_d_hash(const struct dentry *dentry, const struct inode *inode, qstr_t *name)
{
int err = 0;
dentry_t *hidden_dentry;
@@ -96,7 +96,7 @@ mini_fo_d_hash(dentry_t *dentry, qstr_t
if(hidden_sto_dentry &&
hidden_sto_dentry->d_op &&
@ -35,13 +46,45 @@
goto out;
}
}
@@ -148,7 +148,8 @@ mini_fo_d_compare(dentry_t *dentry, qstr
hidden_dentry = dtohd(dentry);
@@ -136,21 +136,25 @@ mini_fo_d_hash(dentry_t *dentry, qstr_t
STATIC int
-mini_fo_d_compare(dentry_t *dentry, qstr_t *a, qstr_t *b)
+mini_fo_d_compare(const struct dentry *dentry_a, const struct inode *inode_a,
+ const struct dentry *dentry_b, const struct inode *inode_b,
+ unsigned int alen, const char *a, const struct qstr *b)
{
int err;
dentry_t *hidden_dentry=NULL;
/* hidden_dentry = mini_fo_hidden_dentry(dentry); */
- if(dtohd2(dentry))
- hidden_dentry = dtohd2(dentry);
- else if(dtohd(dentry))
- hidden_dentry = dtohd(dentry);
+ if(dtohd2(dentry_a))
+ hidden_dentry = dtohd2(dentry_a);
+ else if(dtohd(dentry_a))
+ hidden_dentry = dtohd(dentry_a);
if (hidden_dentry && hidden_dentry->d_op && hidden_dentry->d_op->d_compare) {
- err = hidden_dentry->d_op->d_compare(hidden_dentry, a, b);
+ err = hidden_dentry->d_op->d_compare(NULL, NULL, NULL, NULL,
+ hidden_dentry->d_name.len, a, b);
+ err = hidden_dentry->d_op->d_compare(hidden_dentry, hidden_dentry->d_inode,
+ dentry_b, inode_b,
+ alen, a, b);
} else {
err = ((a->len != b->len) || memcmp(a->name, b->name, b->len));
- err = ((a->len != b->len) || memcmp(a->name, b->name, b->len));
+ err = ((alen != b->len) || memcmp(a, b->name, b->len));
}
return err;
@@ -158,7 +162,7 @@ mini_fo_d_compare(dentry_t *dentry, qstr
int
-mini_fo_d_delete(dentry_t *dentry)
+mini_fo_d_delete(const struct dentry *dentry)
{
dentry_t *hidden_dentry;
dentry_t *hidden_sto_dentry;