commit 76881de9726902fed399f99a45ba9f9783fa8e07
Author: Rachita Kothiyal <[EMAIL PROTECTED]>
Date: Wed Mar 19 16:44:26 2008 -0400
Unionfs odf: Fix odf unmount OOPs on export
Fix a leaked reference count on odf_root when trying to connect
disconnected dentries in __get_parent
Signed-off-by: Rachita Kothiyal <[EMAIL PROTECTED]>
diff --git a/fs/unionfs/export.c b/fs/unionfs/export.c
index fd82a33..9466a10 100644
--- a/fs/unionfs/export.c
+++ b/fs/unionfs/export.c
@@ -51,8 +51,7 @@ static struct dentry *__get_parent(struct super_block *sb,
__odf_dstack_push(&stack, d);
if (!is_anon(d)) {
d = d->d_parent;
- if (d != odf_root)
- dget(d);
+ dget(d);
} else {
/*
* if the odf dentry is disconnected we get its
@@ -67,6 +66,12 @@ static struct dentry *__get_parent(struct super_block *sb,
}
d = d_parent;
}
+ /*
+ * We dont push odf root on stack, but the code above has
+ * already incremented its reference count. Drop it here.
+ */
+ if (d == odf_root)
+ dput(d);
} while (d != odf_root);
/*
_______________________________________________
unionfs-cvs mailing list: http://unionfs.filesystems.org/
[email protected]
http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs-cvs