+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
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
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)
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);
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