aboutsummaryrefslogtreecommitdiffstats
path: root/fs/fuse/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/fuse/inode.c')
-rw-r--r--fs/fuse/inode.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c
index 73ca6b72beaf..01353ed75750 100644
--- a/fs/fuse/inode.c
+++ b/fs/fuse/inode.c
@@ -92,6 +92,7 @@ static struct inode *fuse_alloc_inode(struct super_block *sb)
92 fi->attr_version = 0; 92 fi->attr_version = 0;
93 fi->writectr = 0; 93 fi->writectr = 0;
94 fi->orig_ino = 0; 94 fi->orig_ino = 0;
95 fi->state = 0;
95 INIT_LIST_HEAD(&fi->write_files); 96 INIT_LIST_HEAD(&fi->write_files);
96 INIT_LIST_HEAD(&fi->queued_writes); 97 INIT_LIST_HEAD(&fi->queued_writes);
97 INIT_LIST_HEAD(&fi->writepages); 98 INIT_LIST_HEAD(&fi->writepages);
@@ -408,12 +409,12 @@ static int fuse_statfs(struct dentry *dentry, struct kstatfs *buf)
408 struct fuse_statfs_out outarg; 409 struct fuse_statfs_out outarg;
409 int err; 410 int err;
410 411
411 if (!fuse_allow_task(fc, current)) { 412 if (!fuse_allow_current_process(fc)) {
412 buf->f_type = FUSE_SUPER_MAGIC; 413 buf->f_type = FUSE_SUPER_MAGIC;
413 return 0; 414 return 0;
414 } 415 }
415 416
416 req = fuse_get_req(fc); 417 req = fuse_get_req_nopages(fc);
417 if (IS_ERR(req)) 418 if (IS_ERR(req))
418 return PTR_ERR(req); 419 return PTR_ERR(req);
419 420
@@ -863,6 +864,10 @@ static void process_init_reply(struct fuse_conn *fc, struct fuse_req *req)
863 fc->dont_mask = 1; 864 fc->dont_mask = 1;
864 if (arg->flags & FUSE_AUTO_INVAL_DATA) 865 if (arg->flags & FUSE_AUTO_INVAL_DATA)
865 fc->auto_inval_data = 1; 866 fc->auto_inval_data = 1;
867 if (arg->flags & FUSE_DO_READDIRPLUS)
868 fc->do_readdirplus = 1;
869 if (arg->flags & FUSE_READDIRPLUS_AUTO)
870 fc->readdirplus_auto = 1;
866 } else { 871 } else {
867 ra_pages = fc->max_read / PAGE_CACHE_SIZE; 872 ra_pages = fc->max_read / PAGE_CACHE_SIZE;
868 fc->no_lock = 1; 873 fc->no_lock = 1;
@@ -889,7 +894,8 @@ static void fuse_send_init(struct fuse_conn *fc, struct fuse_req *req)
889 arg->flags |= FUSE_ASYNC_READ | FUSE_POSIX_LOCKS | FUSE_ATOMIC_O_TRUNC | 894 arg->flags |= FUSE_ASYNC_READ | FUSE_POSIX_LOCKS | FUSE_ATOMIC_O_TRUNC |
890 FUSE_EXPORT_SUPPORT | FUSE_BIG_WRITES | FUSE_DONT_MASK | 895 FUSE_EXPORT_SUPPORT | FUSE_BIG_WRITES | FUSE_DONT_MASK |
891 FUSE_SPLICE_WRITE | FUSE_SPLICE_MOVE | FUSE_SPLICE_READ | 896 FUSE_SPLICE_WRITE | FUSE_SPLICE_MOVE | FUSE_SPLICE_READ |
892 FUSE_FLOCK_LOCKS | FUSE_IOCTL_DIR | FUSE_AUTO_INVAL_DATA; 897 FUSE_FLOCK_LOCKS | FUSE_IOCTL_DIR | FUSE_AUTO_INVAL_DATA |
898 FUSE_DO_READDIRPLUS | FUSE_READDIRPLUS_AUTO;
893 req->in.h.opcode = FUSE_INIT; 899 req->in.h.opcode = FUSE_INIT;
894 req->in.numargs = 1; 900 req->in.numargs = 1;
895 req->in.args[0].size = sizeof(*arg); 901 req->in.args[0].size = sizeof(*arg);
@@ -1034,12 +1040,12 @@ static int fuse_fill_super(struct super_block *sb, void *data, int silent)
1034 /* only now - we want root dentry with NULL ->d_op */ 1040 /* only now - we want root dentry with NULL ->d_op */
1035 sb->s_d_op = &fuse_dentry_operations; 1041 sb->s_d_op = &fuse_dentry_operations;
1036 1042
1037 init_req = fuse_request_alloc(); 1043 init_req = fuse_request_alloc(0);
1038 if (!init_req) 1044 if (!init_req)
1039 goto err_put_root; 1045 goto err_put_root;
1040 1046
1041 if (is_bdev) { 1047 if (is_bdev) {
1042 fc->destroy_req = fuse_request_alloc(); 1048 fc->destroy_req = fuse_request_alloc(0);
1043 if (!fc->destroy_req) 1049 if (!fc->destroy_req)
1044 goto err_free_init_req; 1050 goto err_free_init_req;
1045 } 1051 }