fix
diff --git a/kernel/configure.ac b/kernel/configure.ac
index 2723693..30e4a10 100644
--- a/kernel/configure.ac
+++ b/kernel/configure.ac
@@ -91,7 +91,7 @@
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"
diff --git a/kernel/dir.c b/kernel/dir.c
index 99192c3..2aa16e9 100644
--- a/kernel/dir.c
+++ b/kernel/dir.c
@@ -581,6 +581,7 @@
filldir);
__free_page(page);
+ fuse_invalidate_attr(inode); /* atime changed */
return err;
}
@@ -614,6 +615,7 @@
link[req->out.args[0].size] = '\0';
out:
fuse_put_request(fc, req);
+ fuse_invalidate_attr(inode); /* atime changed */
return link;
}
diff --git a/kernel/file.c b/kernel/file.c
index 02dc9f0..9cf7413 100644
--- a/kernel/file.c
+++ b/kernel/file.c
@@ -248,8 +248,7 @@
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 @@
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 @@
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 @@
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;
}
diff --git a/kernel/fuse_i.h b/kernel/fuse_i.h
index 6b7ba16..be20e74 100644
--- a/kernel/fuse_i.h
+++ b/kernel/fuse_i.h
@@ -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
diff --git a/kernel/inode.c b/kernel/inode.c
index e256cd7..60c5ade 100644
--- a/kernel/inode.c
+++ b/kernel/inode.c
@@ -540,7 +540,7 @@
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 @@
.encode_fh = fuse_encode_fh,
};
#endif
+#endif
static struct super_operations fuse_super_operations = {
.alloc_inode = fuse_alloc_inode,
@@ -630,9 +631,11 @@
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);
if (!file)
diff --git a/lib/fuse.c b/lib/fuse.c
index 0ee4ab4..a00ef1a 100644
--- a/lib/fuse.c
+++ b/lib/fuse.c
@@ -95,7 +95,7 @@
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 @@
unsigned namelen = strlen(name);
unsigned entsize;
unsigned newlen;
- unsigned char *newptr;
+ char *newptr;
if (stat)
stbuf = *stat;
diff --git a/lib/fuse_lowlevel.c b/lib/fuse_lowlevel.c
index 7f92d04..d875664 100644
--- a/lib/fuse_lowlevel.c
+++ b/lib/fuse_lowlevel.c
@@ -653,7 +653,7 @@
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,
diff --git a/lib/fuse_mt.c b/lib/fuse_mt.c
index c9d85a8..bbd0392 100644
--- a/lib/fuse_mt.c
+++ b/lib/fuse_mt.c
@@ -77,8 +77,8 @@
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);
}
diff --git a/util/fusermount.c b/util/fusermount.c
index 1fe3127..9c7bbf3 100644
--- a/util/fusermount.c
+++ b/util/fusermount.c
@@ -824,8 +824,8 @@
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;