diff options
author | Miklos Szeredi <miklos@szeredi.hu> | 2001-11-07 14:55:16 +0000 |
---|---|---|
committer | Miklos Szeredi <miklos@szeredi.hu> | 2001-11-07 14:55:16 +0000 |
commit | f3ea83bac4cc55033a1db39a109bbf70b87f0578 (patch) | |
tree | 1bd2348ad53ee1f06ea32edea095a0eb32b9e7d1 /kernel | |
parent | c0938eafb8ea4927f21268eb7e67377c2c78a4eb (diff) | |
download | libfuse-f3ea83bac4cc55033a1db39a109bbf70b87f0578.tar.gz |
build and install fixes
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/Makefile.am | 18 | ||||
-rw-r--r-- | kernel/dir.c | 15 |
2 files changed, 22 insertions, 11 deletions
diff --git a/kernel/Makefile.am b/kernel/Makefile.am index cefcf63..4edce67 100644 --- a/kernel/Makefile.am +++ b/kernel/Makefile.am @@ -2,15 +2,25 @@ EXTRA_DIST = dev.c dir.c file.c inode.c util.c fuse_i.h +CC = @CC@ +CFLAGS = -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -pipe +CPPFAGS = -I@KERNINCLUDE@ -I../include -D__KERNEL__ -DMODULE -D_LOOSE_KERNEL_NAMES +INSTALL = @INSTALL@ +fusemoduledir = @kmoduledir@/kernel/fs/fuse + +SUFFIXES = .c .o .s + + all-local: fuse.o +install-exec-local: fuse.o + $(mkinstalldirs) $(DESTDIR)$(fusemoduledir) + $(INSTALL) -m 644 fuse.o $(DESTDIR)$(fusemoduledir)/fuse.o + /sbin/depmod -a + clean-local: rm -f *.o *.s -CFLAGS = -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -pipe -CPPFAGS = -I@KERNINCLUDE@ -I../include -D__KERNEL__ -DMODULE -D_LOOSE_KERNEL_NAMES - -SUFFIXES = .c .o .s .c.o: $(CC) $(CFLAGS) $(CPPFAGS) -c $< diff --git a/kernel/dir.c b/kernel/dir.c index a4018ca..87f7241 100644 --- a/kernel/dir.c +++ b/kernel/dir.c @@ -19,7 +19,8 @@ static struct file_operations fuse_dir_operations; static struct dentry_operations fuse_dentry_opertations; -#define FUSE_REVALIDATE_TIME (HZ / 100) +/* FIXME: This should be user configurable */ +#define FUSE_REVALIDATE_TIME (1 * HZ) static void change_attributes(struct inode *inode, struct fuse_attr *attr) { @@ -528,13 +529,13 @@ static int fuse_setattr(struct dentry *entry, struct iattr *attr) out.arg = &outarg; request_send(fc, &in, &out); - if(!out.h.error && (attr->ia_valid & ATTR_SIZE)) { - if(outarg.newsize > attr->ia_size) - outarg.newsize = attr->ia_size; - - vmtruncate(inode, outarg.newsize); - } + if(!out.h.error) { + if(attr->ia_valid & ATTR_SIZE && + outarg.attr.size < inode->i_size) + vmtruncate(inode, outarg.attr.size); + change_attributes(inode, &outarg.attr); + } return out.h.error; } |