fix
authorMiklos Szeredi <miklos@szeredi.hu>
Mon, 28 Nov 2005 16:02:27 +0000 (16:02 +0000)
committerMiklos Szeredi <miklos@szeredi.hu>
Mon, 28 Nov 2005 16:02:27 +0000 (16:02 +0000)
ChangeLog
kernel/fuse_kernel.h
kernel/inode.c
lib/fuse.c
util/fusermount.c

index 9ddd60ec196bbd5a85f65d26e17af665c929e05a..c024c77dcb2b05f886b1f81027225bb7b22e0e09 100644 (file)
--- 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>
 
index b755fdb1e7050e00cf723769c3e2cf0093689718..e43153e463faa7c7cec207b4e105c550ef3f9609 100644 (file)
@@ -251,7 +251,7 @@ struct fuse_write_out {
        __u32   padding;
 };
 
-#define FUSE_COMPAT_STATFS_SIZE 12
+#define FUSE_COMPAT_STATFS_SIZE 48
 
 struct fuse_statfs_out {
        struct fuse_kstatfs st;
index f2d676842d7e6ee1148d1e5638db85c5c282ee0d..bb61b7de965cf3ce96801f1cf28251e41f802720 100644 (file)
@@ -315,7 +315,7 @@ static int fuse_statfs(struct super_block *sb, struct kstatfs *buf)
        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);
index ee9566488955f3256269b1cf44099ba3c5962941..4146d418b0fdcd69033fce5bf1e06eb1e7de5c69 100644 (file)
@@ -1299,6 +1299,7 @@ static struct fuse_dirhandle *get_dirhandle(const struct fuse_file_info *llfi,
     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 @@ static int fuse_do_open(struct fuse *f, char *path, struct fuse_file_info *fi)
         fi->fh = tmp.fh;
         return err;
     } else
-        return 
+        return
             ((struct fuse_operations_compat2 *) &f->op)->open(path, fi->flags);
 }
 
@@ -2173,7 +2174,7 @@ __asm__(".symver fuse_new_compat22,fuse_new@FUSE_2.2");
 
 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 void fuse_do_release(struct fuse *f, char *path,
 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)
index 8d5562e93a6ad08e12f68624de9e1850650169b6..2daedae945d9843cb3ca0e1c979fcb19bd57c4f7 100644 (file)
@@ -145,7 +145,7 @@ static int add_mount(const char *fsname, const char *mnt, const char *type,
     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;