diff options
author | 2005-09-02 16:04:48 +0000 | |
---|---|---|
committer | 2005-09-02 16:04:48 +0000 | |
commit | 3b9e53f3ad56b3dd8d7720c38125d15a7820dcc3 (patch) | |
tree | b0333f2d28875ea1416a114e928464d9d1a6e971 | |
parent | 0716de0eed50a3ad4b1d966561aa914165175aa8 (diff) |
fix
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | kernel/dir.c | 2 | ||||
-rw-r--r-- | kernel/file.c | 7 | ||||
-rw-r--r-- | kernel/fuse_i.h | 3 | ||||
-rw-r--r-- | kernel/inode.c | 4 |
5 files changed, 14 insertions, 4 deletions
@@ -5,7 +5,7 @@ * Fix compile warning on 2.6.13 and later - * Fix compilation on 2.4.* + * Fix compilation on old kernels 2005-08-25 Miklos Szeredi <miklos@szeredi.hu> diff --git a/kernel/dir.c b/kernel/dir.c index 623902c..826f444 100644 --- a/kernel/dir.c +++ b/kernel/dir.c @@ -16,7 +16,7 @@ #include <linux/mm.h> #endif #include <linux/sched.h> -#ifdef KERNEL_2_6_8_PLUS +#ifdef KERNEL_2_6 #include <linux/namei.h> #endif diff --git a/kernel/file.c b/kernel/file.c index cce2777..0b7ee5a 100644 --- a/kernel/file.c +++ b/kernel/file.c @@ -734,11 +734,14 @@ static int fuse_file_lock(struct file *file, int cmd, struct file_lock *fl) else { #ifdef KERNEL_2_6 int err = fuse_setlk(file, fl, fl->fl_flags & FL_SLEEP); - if (err == -ENOSYS) - err = posix_lock_file_wait(file, fl); #else int err = fuse_setlk(file, fl, cmd == F_SETLKW || cmd == F_SETLKW64); +#endif +#ifdef KERNEL_2_6_9_PLUS + if (err == -ENOSYS) + err = posix_lock_file_wait(file, fl); +#else if (err == -ENOSYS) err = 0; #endif diff --git a/kernel/fuse_i.h b/kernel/fuse_i.h index 1f30d82..8b13d65 100644 --- a/kernel/fuse_i.h +++ b/kernel/fuse_i.h @@ -25,6 +25,9 @@ # if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,8) # define KERNEL_2_6_8_PLUS # endif +# if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,9) +# define KERNEL_2_6_9_PLUS +# endif # if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,10) # define KERNEL_2_6_10_PLUS # endif diff --git a/kernel/inode.c b/kernel/inode.c index 4359b9a..142991c 100644 --- a/kernel/inode.c +++ b/kernel/inode.c @@ -199,7 +199,11 @@ struct inode *fuse_iget(struct super_block *sb, unsigned long nodeid, return NULL; if ((inode->i_state & I_NEW)) { +#ifdef KERNEL_2_6_8_PLUS inode->i_flags |= S_NOATIME|S_NOCMTIME; +#else + inode->i_flags |= S_NOATIME; +#endif inode->i_generation = generation; inode->i_data.backing_dev_info = &fc->bdi; fuse_init_inode(inode, attr); |