fix
authorMiklos Szeredi <miklos@szeredi.hu>
Thu, 28 Jul 2005 11:07:29 +0000 (11:07 +0000)
committerMiklos Szeredi <miklos@szeredi.hu>
Thu, 28 Jul 2005 11:07:29 +0000 (11:07 +0000)
kernel/configure.ac
kernel/dir.c
kernel/file.c
kernel/fuse_i.h
kernel/inode.c
lib/fuse.c
lib/fuse_lowlevel.c
lib/fuse_mt.c
util/fusermount.c

index 2723693674a9dc5c09f7a6b392bb5ba99ca7f612..30e4a10069e991638673126fa6e1e7359523a2b1 100644 (file)
@@ -91,7 +91,7 @@ if test "$ENABLE_FUSE_MODULE" = y; then
        KERNELMAKE_PARAMS=
        KERNELCPPFLAGS=
        AC_MSG_CHECKING([if this is user mode linux])
-       if test -f $kernelsrc/include/linux/autoconf.h && grep -q "^#define CONFIG_USERMODE 1" $kernelsrc/include/linux/autoconf.h; then
+       if test -f $kernelsrc/include/linux/autoconf.h && egrep -q "^#define CONFIG_(USERMODE|UML) 1" $kernelsrc/include/linux/autoconf.h; then
                isuml=yes
                KERNELMAKE_PARAMS="ARCH=um"
                KERNELCPPFLAGS="-D__arch_um__ -DSUBARCH=\\\"i386\\\" -D_LARGEFILE64_SOURCE -I${kernelsrc}/arch/um/include -Derrno=kernel_errno -I${kernelsrc}/arch/um/kernel/tt/include -I${kernelsrc}/arch/um/kernel/skas/include"
index 99192c30665709fb69be2aa7616c1e6ede72a904..2aa16e9f26aae9af8d5f1f04305c1722766590a8 100644 (file)
@@ -581,6 +581,7 @@ static int fuse_readdir(struct file *file, void *dstbuf, filldir_t filldir)
                                    filldir);
 
        __free_page(page);
+       fuse_invalidate_attr(inode); /* atime changed */
        return err;
 }
 
@@ -614,6 +615,7 @@ static char *read_link(struct dentry *dentry)
                link[req->out.args[0].size] = '\0';
  out:
        fuse_put_request(fc, req);
+       fuse_invalidate_attr(inode); /* atime changed */
        return link;
 }
 
index 02dc9f053b555cf52f056bf994d233c305121433..9cf741391a6824263f889f23fe916c0ca85f841c 100644 (file)
@@ -248,8 +248,7 @@ static int fuse_readpage(struct file *file, struct page *page)
        fuse_put_request(fc, req);
        if (!err)
                SetPageUptodate(page);
-       if (!(inode->i_sb->s_flags & MS_NOATIME))
-               fuse_invalidate_attr(inode);
+       fuse_invalidate_attr(inode); /* atime changed */
  out:
        unlock_page(page);
        return err;
@@ -270,8 +269,6 @@ static int fuse_send_readpages(struct fuse_req *req, struct file *file,
                        SetPageUptodate(page);
                unlock_page(page);
        }
-       if (!(inode->i_sb->s_flags & MS_NOATIME))
-               fuse_invalidate_attr(inode);
        return req->out.h.error;
 }
 
@@ -321,6 +318,7 @@ static int fuse_readpages(struct file *file, struct address_space *mapping,
        if (!err && data.req->num_pages)
                err = fuse_send_readpages(data.req, file, inode);
        fuse_put_request(fc, data.req);
+       fuse_invalidate_attr(inode); /* atime changed */
        return err;
 }
 #else /* KERNEL_2_6 */
@@ -582,8 +580,7 @@ static ssize_t fuse_direct_io(struct file *file, const char __user *buf,
                        i_size_write(inode, pos);
                *ppos = pos;
        }
-       if (write || !(inode->i_sb->s_flags & MS_NOATIME))
-               fuse_invalidate_attr(inode);
+       fuse_invalidate_attr(inode);
 
        return res;
 }
index 6b7ba160f36e0ba14760b8d2c56d52da73e6475a..be20e7449b417f5bd6f819c9d99748cf7b163504 100644 (file)
@@ -11,6 +11,7 @@
 #else
 #include "fuse_kernel.h"
 #include <linux/version.h>
+#include <linux/utsname.h>
 
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) && LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
 #error Kernel version 2.5.* not supported
index e256cd79802ad2155d4c0fa3ec029be7918d0b01..60c5ade4aff9bdd971602ebc514587b0e75dd42e 100644 (file)
@@ -540,7 +540,7 @@ static struct inode *get_root_inode(struct super_block *sb, unsigned mode)
        attr.ino = FUSE_ROOT_ID;
        return fuse_iget(sb, 1, 0, &attr);
 }
-
+#ifndef FUSE_MAINLINE
 #ifdef KERNEL_2_6
 static struct dentry *fuse_get_dentry(struct super_block *sb, void *vobjp)
 {
@@ -603,6 +603,7 @@ static struct export_operations fuse_export_operations = {
        .encode_fh      = fuse_encode_fh,
 };
 #endif
+#endif
 
 static struct super_operations fuse_super_operations = {
        .alloc_inode    = fuse_alloc_inode,
@@ -630,8 +631,10 @@ static int fuse_fill_super(struct super_block *sb, void *data, int silent)
        sb->s_magic = FUSE_SUPER_MAGIC;
        sb->s_op = &fuse_super_operations;
        sb->s_maxbytes = MAX_LFS_FILESIZE;
+#ifndef FUSE_MAINLINE
 #ifdef KERNEL_2_6
        sb->s_export_op = &fuse_export_operations;
+#endif
 #endif
 
        file = fget(d.fd);
index 0ee4ab40ede143d2dd4c62c43800315bbb2c610a..a00ef1aeea37cc6004485c13d03fdbef0412f74e 100644 (file)
@@ -95,7 +95,7 @@ struct node {
 struct fuse_dirhandle {
     pthread_mutex_t lock;
     struct fuse *fuse;
-    unsigned char *contents;
+    char *contents;
     int allocated;
     unsigned len;
     unsigned needlen;
@@ -1231,7 +1231,7 @@ static int fill_dir_common(struct fuse_dirhandle *dh, const char *name,
     unsigned namelen = strlen(name);
     unsigned entsize;
     unsigned newlen;
-    unsigned char *newptr;
+    char *newptr;
 
     if (stat)
         stbuf = *stat;
index 7f92d047ee1345259381d66af365976e40ef784b..d8756641935032b3984719acc5a41f288dfed7df 100644 (file)
@@ -653,7 +653,7 @@ static void do_setxattr(fuse_req_t req, fuse_ino_t nodeid,
                         struct fuse_setxattr_in *arg)
 {
     char *name = PARAM(arg);
-    unsigned char *value = name + strlen(name) + 1;
+    char *value = name + strlen(name) + 1;
 
     if (req->f->op.setxattr)
             req->f->op.setxattr(req, nodeid, name, value, arg->size,
index c9d85a8a0d88c55986e55c572f21878ebc390447..bbd03921fef957ba1d59e6004396a62fb850883d 100644 (file)
@@ -77,8 +77,8 @@ struct procdata {
 
 static void mt_generic_proc(struct fuse_ll *f, struct fuse_cmd *cmd, void *data)
 {
-    (void) f;
     struct procdata *pd = (struct procdata *) data;
+    (void) f;
     pd->proc(pd->f, cmd, pd->data);
 }
 
index 1fe312736ab16e4a2864537e911d5de198110df7..9c7bbf31491c32455b784f2037db730940456fc6 100644 (file)
@@ -824,8 +824,8 @@ static int mount_fuse(const char *mnt, const char *opts)
     char *dev;
     const char *type = "fuse";
     struct stat stbuf;
-    char *fsname;
-    char *mnt_opts;
+    char *fsname = NULL;
+    char *mnt_opts = NULL;
     const char *real_mnt = mnt;
     int currdir_fd = -1;
     int mountpoint_fd = -1;