fix
diff --git a/ChangeLog b/ChangeLog
index 9ddd60e..c024c77 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2005-11-28  Miklos Szeredi <miklos@szeredi.hu>
+
+	* Fix bug in 32-bit file handle compatibility
+
 2005-11-27  Miklos Szeredi <miklos@szeredi.hu>
 
 	* Block TERM, INT, HUP and QUIT signals in all but the main
@@ -25,7 +29,7 @@
 
 	* libfuse: added 'negative_timeout' option: specifies how much
 	negative entries should be cached.  Default is zero, to be
-	compatible with prior versions.
+	compatible with prior versions
 
 2005-11-22  Miklos Szeredi <miklos@szeredi.hu>
 
diff --git a/kernel/fuse_kernel.h b/kernel/fuse_kernel.h
index b755fdb..e43153e 100644
--- a/kernel/fuse_kernel.h
+++ b/kernel/fuse_kernel.h
@@ -251,7 +251,7 @@
 	__u32	padding;
 };
 
-#define FUSE_COMPAT_STATFS_SIZE 12
+#define FUSE_COMPAT_STATFS_SIZE 48
 
 struct fuse_statfs_out {
 	struct fuse_kstatfs st;
diff --git a/kernel/inode.c b/kernel/inode.c
index f2d6768..bb61b7d 100644
--- a/kernel/inode.c
+++ b/kernel/inode.c
@@ -315,7 +315,7 @@
 	req->in.numargs = 0;
 	req->in.h.opcode = FUSE_STATFS;
 	req->out.numargs = 1;
-	req->out.args[0].size = 
+	req->out.args[0].size =
 		fc->minor < 4 ? FUSE_COMPAT_STATFS_SIZE : sizeof(outarg);
 	req->out.args[0].value = &outarg;
 	request_send(fc, req);
diff --git a/lib/fuse.c b/lib/fuse.c
index ee95664..4146d41 100644
--- a/lib/fuse.c
+++ b/lib/fuse.c
@@ -1299,6 +1299,7 @@
     struct fuse_dirhandle *dh = (struct fuse_dirhandle *) (uintptr_t) llfi->fh;
     memset(fi, 0, sizeof(struct fuse_file_info));
     fi->fh = dh->fh;
+    fi->fh_old = dh->fh;
     return dh;
 }
 
@@ -2064,7 +2065,7 @@
         fi->fh = tmp.fh;
         return err;
     } else
-        return 
+        return
             ((struct fuse_operations_compat2 *) &f->op)->open(path, fi->flags);
 }
 
@@ -2173,7 +2174,7 @@
 
 static int fuse_do_open(struct fuse *f, char *path, struct fuse_file_info *fi)
 {
-    return f->op.open(path, fi);    
+    return f->op.open(path, fi);
 }
 
 static void fuse_do_release(struct fuse *f, char *path,
@@ -2185,7 +2186,7 @@
 static int fuse_do_opendir(struct fuse *f, char *path,
                            struct fuse_file_info *fi)
 {
-    return f->op.opendir(path, fi);    
+    return f->op.opendir(path, fi);
 }
 
 static int fuse_do_statfs(struct fuse *f, char *path, struct statvfs *buf)
diff --git a/util/fusermount.c b/util/fusermount.c
index 8d5562e..2daedae 100644
--- a/util/fusermount.c
+++ b/util/fusermount.c
@@ -145,7 +145,7 @@
     struct mntent ent;
     FILE *fp;
 
-    if (check_name(fsname) == -1 || check_name(mnt) == -1 || 
+    if (check_name(fsname) == -1 || check_name(mnt) == -1 ||
         check_name(type) == -1 || check_name(opts) == -1)
         return -1;