]> err.no Git - linux-2.6/blobdiff - fs/fuse/inode.c
[PATCH] fuse: check directory aliasing in mkdir
[linux-2.6] / fs / fuse / inode.c
index 298c1d4c153403d8766b24e6e2ebb8b98df52c06..e69a546844d0f23770f3dd5e690f20284a27cd01 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);
@@ -235,7 +236,7 @@ static int fuse_statfs(struct super_block *sb, struct kstatfs *buf)
 
         req = fuse_get_request(fc);
        if (!req)
-               return -ERESTARTSYS;
+               return -EINTR;
 
        req->in.numargs = 0;
        req->in.h.opcode = FUSE_STATFS;
@@ -257,7 +258,6 @@ enum {
        OPT_GROUP_ID,
        OPT_DEFAULT_PERMISSIONS,
        OPT_ALLOW_OTHER,
-       OPT_KERNEL_CACHE,
        OPT_MAX_READ,
        OPT_ERR
 };
@@ -269,7 +269,6 @@ static match_table_t tokens = {
        {OPT_GROUP_ID,                  "group_id=%u"},
        {OPT_DEFAULT_PERMISSIONS,       "default_permissions"},
        {OPT_ALLOW_OTHER,               "allow_other"},
-       {OPT_KERNEL_CACHE,              "kernel_cache"},
        {OPT_MAX_READ,                  "max_read=%u"},
        {OPT_ERR,                       NULL}
 };
@@ -325,10 +324,6 @@ static int parse_fuse_opt(char *opt, struct fuse_mount_data *d)
                        d->flags |= FUSE_ALLOW_OTHER;
                        break;
 
-               case OPT_KERNEL_CACHE:
-                       d->flags |= FUSE_KERNEL_CACHE;
-                       break;
-
                case OPT_MAX_READ:
                        if (match_int(&args[0], &value))
                                return 0;
@@ -357,8 +352,6 @@ static int fuse_show_options(struct seq_file *m, struct vfsmount *mnt)
                seq_puts(m, ",default_permissions");
        if (fc->flags & FUSE_ALLOW_OTHER)
                seq_puts(m, ",allow_other");
-       if (fc->flags & FUSE_KERNEL_CACHE)
-               seq_puts(m, ",kernel_cache");
        if (fc->max_read != ~0)
                seq_printf(m, ",max_read=%u", fc->max_read);
        return 0;
@@ -489,6 +482,7 @@ static int fuse_fill_super(struct super_block *sb, void *data, int silent)
        fc->max_read = d.max_read;
        if (fc->max_read / PAGE_CACHE_SIZE < fc->bdi.ra_pages)
                fc->bdi.ra_pages = fc->max_read / PAGE_CACHE_SIZE;
+       fc->max_write = FUSE_MAX_IN / 2;
 
        err = -ENOMEM;
        root = get_root_inode(sb, d.rootmode);