]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/fuse/inode.c
[PATCH] fuse: support caching negative dentries
[karo-tx-linux.git] / fs / fuse / inode.c
index 8dc66760b41a96c6dddf46a11ce0b3e087f70dea..3b928a02af04f71acd8e283e8f44cd8957708c05 100644 (file)
@@ -173,6 +173,7 @@ struct inode *fuse_iget(struct super_block *sb, unsigned long nodeid,
                return NULL;
 
        if ((inode->i_state & I_NEW)) {
+               inode->i_flags |= S_NOATIME|S_NOCMTIME;
                inode->i_generation = generation;
                inode->i_data.backing_dev_info = &fc->bdi;
                fuse_init_inode(inode, attr);
@@ -217,6 +218,7 @@ static void convert_fuse_statfs(struct kstatfs *stbuf, struct fuse_kstatfs *attr
 {
        stbuf->f_type    = FUSE_SUPER_MAGIC;
        stbuf->f_bsize   = attr->bsize;
+       stbuf->f_frsize  = attr->frsize;
        stbuf->f_blocks  = attr->blocks;
        stbuf->f_bfree   = attr->bfree;
        stbuf->f_bavail  = attr->bavail;
@@ -235,12 +237,14 @@ static int fuse_statfs(struct super_block *sb, struct kstatfs *buf)
 
         req = fuse_get_request(fc);
        if (!req)
-               return -ERESTARTSYS;
+               return -EINTR;
 
+       memset(&outarg, 0, sizeof(outarg));
        req->in.numargs = 0;
        req->in.h.opcode = FUSE_STATFS;
        req->out.numargs = 1;
-       req->out.args[0].size = sizeof(outarg);
+       req->out.args[0].size =
+               fc->minor < 4 ? FUSE_COMPAT_STATFS_SIZE : sizeof(outarg);
        req->out.args[0].value = &outarg;
        request_send(fc, req);
        err = req->out.h.error;