* Connection may be aborted through either the sysfs interface or
with 'umount -f mountpoint'
- *
-
2006-01-14 Miklos Szeredi <miklos@szeredi.hu>
* Released 2.5.0
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;
}
# if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13)
# define KERNEL_2_6_13_PLUS
# endif
+# if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
+# define KERNEL_2_6_16_PLUS
+# endif
#endif
#include "config.h"