* 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>
#include <linux/mm.h>
#endif
#include <linux/sched.h>
-#ifdef KERNEL_2_6_8_PLUS
+#ifdef KERNEL_2_6
#include <linux/namei.h>
#endif
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
# 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
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);