aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Miklos Szeredi <miklos@szeredi.hu>2005-04-22 07:54:11 +0000
committerGravatar Miklos Szeredi <miklos@szeredi.hu>2005-04-22 07:54:11 +0000
commitd001bf9915e651dd301c29aafe0b7e777a1ae7cf (patch)
treeb29661773e7095c5cc8af918fdb07a6d54c2ce5c
parent89814a18530fd45af0793c1dd7b240453421c1bf (diff)
fixes
-rw-r--r--ChangeLog8
-rw-r--r--kernel/Makefile.in2
-rw-r--r--kernel/file.c15
3 files changed, 21 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 4d83e65..94327f4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2005-04-22 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Add -msoft-float to kernel module compile flags for 2.4.X. This
+ is needed on certain architectures. Report from Chris Kirby
+
+ * Fix buggy behavior of open(..., O_CREAT|O_EXCL) if interrupted.
+ Reported by David Shaw
+
2005-04-08 Miklos Szeredi <miklos@szeredi.hu>
* Fix Oops in case of nfs export. Spotted by David Shaw
diff --git a/kernel/Makefile.in b/kernel/Makefile.in
index 50dde76..8bf1081 100644
--- a/kernel/Makefile.in
+++ b/kernel/Makefile.in
@@ -56,7 +56,7 @@ ifeq ($(majver), 2.4)
CC = gcc
LD = ld
-CFLAGS = -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -pipe
+CFLAGS = -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -pipe -msoft-float
CPPFLAGS = -I@kernelsrc@/include -I. -D__KERNEL__ -DMODULE -D_LOOSE_KERNEL_NAMES -DFUSE_VERSION=\"$(VERSION)\" @KERNELCPPFLAGS@
fuse_objs = dev.o dir.o file.o inode.o compat/parser.o
diff --git a/kernel/file.c b/kernel/file.c
index e7de38a..cf8e855 100644
--- a/kernel/file.c
+++ b/kernel/file.c
@@ -24,6 +24,9 @@ int fuse_open_common(struct inode *inode, struct file *file, int isdir)
struct fuse_open_out outarg;
struct fuse_file *ff;
int err;
+ /* Restarting the syscall is not allowed if O_CREAT and O_EXCL
+ are both set, because creation will fail on the restart */
+ int excl = (file->f_flags & (O_CREAT|O_EXCL)) == (O_CREAT|O_EXCL);
err = generic_file_open(inode, file);
if (err)
@@ -37,9 +40,12 @@ int fuse_open_common(struct inode *inode, struct file *file, int isdir)
return err;
}
- req = fuse_get_request(fc);
+ if (excl)
+ req = fuse_get_request_nonint(fc);
+ else
+ req = fuse_get_request(fc);
if (!req)
- return -ERESTARTSYS;
+ return excl ? -EINTR : -ERESTARTSYS;
err = -ENOMEM;
ff = kmalloc(sizeof(struct fuse_file), GFP_KERNEL);
@@ -63,7 +69,10 @@ int fuse_open_common(struct inode *inode, struct file *file, int isdir)
req->out.numargs = 1;
req->out.args[0].size = sizeof(outarg);
req->out.args[0].value = &outarg;
- request_send(fc, req);
+ if (excl)
+ request_send_nonint(fc, req);
+ else
+ request_send(fc, req);
err = req->out.h.error;
if (!err && !(fc->flags & FUSE_KERNEL_CACHE))
#ifdef KERNEL_2_6