diff options
author | Miklos Szeredi <miklos@szeredi.hu> | 2007-03-14 09:13:27 +0000 |
---|---|---|
committer | Miklos Szeredi <miklos@szeredi.hu> | 2007-03-14 09:13:27 +0000 |
commit | 2f759e1950e3908eb48fc000e88e0159649d8632 (patch) | |
tree | 32caeb503d8eca18617a1d3c092cb08ffb48ecac | |
parent | 3a7c00ec0c156123c47b53ec1cd7ead001fa4dfb (diff) | |
download | libfuse-2f759e1950e3908eb48fc000e88e0159649d8632.tar.gz |
Correctly handle O_APPEND in direct IO mode
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | configure.in | 2 | ||||
-rw-r--r-- | kernel/file.c | 4 | ||||
-rw-r--r-- | lib/fuse.c | 1 |
4 files changed, 9 insertions, 3 deletions
@@ -1,3 +1,8 @@ +2007-03-05 Miklos Szeredi <miklos@szeredi.hu> + + * Correctly handle O_APPEND in direct IO mode. Reported by Greg + Bruno + 2007-02-03 Miklos Szeredi <miklos@szeredi.hu> * Add filesystem stacking support to high level API. Filesystem diff --git a/configure.in b/configure.in index 3020f39..b2ef187 100644 --- a/configure.in +++ b/configure.in @@ -88,7 +88,5 @@ AC_SUBST(subdirs2) AM_CONDITIONAL(LINUX, test "$arch" = linux) AM_CONDITIONAL(BSD, test "$arch" = bsd) -AC_CHECK_HEADERS(selinux/selinux.h, AC_CHECK_LIB(selinux, getfilecon)) - AC_CONFIG_FILES([fuse.pc Makefile lib/Makefile util/Makefile example/Makefile include/Makefile]) AC_OUTPUT diff --git a/kernel/file.c b/kernel/file.c index d0f46ad..bdec3a5 100644 --- a/kernel/file.c +++ b/kernel/file.c @@ -627,7 +627,9 @@ static ssize_t fuse_direct_write(struct file *file, const char __user *buf, ssize_t res; /* Don't allow parallel writes to the same file */ mutex_lock(&inode->i_mutex); - res = fuse_direct_io(file, buf, count, ppos, 1); + res = generic_write_checks(file, ppos, &count, 0); + if (!res) + res = fuse_direct_io(file, buf, count, ppos, 1); mutex_unlock(&inode->i_mutex); return res; } @@ -3266,6 +3266,7 @@ static struct fuse *fuse_new_common_compat25(int fd, struct fuse_args *args, main() has been called) */ void fuse_register_module(struct fuse_module *mod) { + mod->ctr = 0; mod->so = fuse_current_so; if (mod->so) mod->so->ctr++; |