The 2.6.18 stats callback parameters have changed from 2.6.17 so that it takes a struct dentry* rather than a struct super_block. Here is a patch to fix the kernel oops under 2.6.18 (includes the changes of the previously posted patch).

--
Matthew Meno
Software Engineer
[T]  407.999.9870
[F]  407.999.9850

I.D.E.A.L. Technology Corporation
http://www.idealcorp.com

"The Leader in Linux and Open Source Solutions"


diff -ruN cdfs.old/2.6/root.c cdfs.new/2.6/root.c
--- cdfs.old/2.6/root.c 2005-05-02 15:39:30.000000000 +0000
+++ cdfs.new/2.6/root.c 2006-10-03 12:29:37.000000000 +0000
@@ -408,7 +408,8 @@
 #ifdef OLD_KERNEL
 static int cdfs_statfs(struct super_block *sb, struct statfs *buf) {
 #else
-static int cdfs_statfs(struct super_block *sb, struct kstatfs *buf) {
+static int cdfs_statfs(struct dentry * dentry, struct kstatfs *buf) {
+  struct super_block * sb = dentry->d_sb;
 #endif
   cd * this_cd = cdfs_info(sb);
   PRINT("rmfs_statfs\n");
@@ -543,8 +544,8 @@
 #ifdef OLD_KERNEL
 static DECLARE_FSTYPE_DEV(cdfs_fs_type, FSNAME, cdfs_mount);
 #else
-static struct super_block *cdfs_get_sb(struct file_system_type *fs_type, int 
flags, const char *dev_name, void *data) {
-  return get_sb_bdev(fs_type, flags, dev_name, data, cdfs_fill_super);
+static int cdfs_get_sb(struct file_system_type *fs_type, int flags, const char 
*dev_name, void *data, struct vfsmount *mnt) {
+  return get_sb_bdev(fs_type, flags, dev_name, data, cdfs_fill_super, mnt);
 }
 
 static struct file_system_type cdfs_fs_type = {

Reply via email to