+2007-01-19 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Build fix for 2.6.16 vanila and 2.6.15 FC5 kernels. Patch from
+ Ian Abbott
+
2007-01-18 Miklos Szeredi <miklos@szeredi.hu>
* Fix abort in fuse_new() compatibility API for opts == NULL case.
struct inode *inode = file->f_dentry->d_inode;
ssize_t res;
/* Don't allow parallel writes to the same file */
-#ifdef KERNEL_2_6_16_PLUS
mutex_lock(&inode->i_mutex);
res = fuse_direct_io(file, buf, count, ppos, 1);
mutex_unlock(&inode->i_mutex);
-#else
- down(&inode->i_sem);
- res = fuse_direct_io(file, buf, count, ppos, 1);
- up(&inode->i_sem);
-#endif
return res;
}
#include <linux/spinlock.h>
#include <linux/mm.h>
#include <linux/backing-dev.h>
-#ifdef KERNEL_2_6_17_PLUS
-#include <linux/mutex.h>
-#else
-#include <asm/semaphore.h>
+#ifndef DEFINE_MUTEX
#define DEFINE_MUTEX(m) DECLARE_MUTEX(m)
#define mutex_init(m) init_MUTEX(m)
#define mutex_destroy(m) do { } while (0)
#define mutex_lock(m) down(m)
#define mutex_unlock(m) up(m)
#define mutex semaphore
+#define i_mutex i_sem /* Hack for struct inode */
#endif
#ifndef KERNEL_2_6_19_PLUS
#define clear_nlink(inode) (inode)->i_nlink = 0