diff options
Diffstat (limited to 'fs/fuse')
-rw-r--r-- | fs/fuse/dev.c | 4 | ||||
-rw-r--r-- | fs/fuse/file.c | 4 | ||||
-rw-r--r-- | fs/fuse/inode.c | 9 |
3 files changed, 6 insertions, 11 deletions
diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c index 5f3368ab0fa9..7df2b5e8fbe1 100644 --- a/fs/fuse/dev.c +++ b/fs/fuse/dev.c | |||
@@ -838,10 +838,10 @@ static int fuse_copy_page(struct fuse_copy_state *cs, struct page **pagep, | |||
838 | } | 838 | } |
839 | } | 839 | } |
840 | if (page) { | 840 | if (page) { |
841 | void *mapaddr = kmap_atomic(page, KM_USER0); | 841 | void *mapaddr = kmap_atomic(page); |
842 | void *buf = mapaddr + offset; | 842 | void *buf = mapaddr + offset; |
843 | offset += fuse_copy_do(cs, &buf, &count); | 843 | offset += fuse_copy_do(cs, &buf, &count); |
844 | kunmap_atomic(mapaddr, KM_USER0); | 844 | kunmap_atomic(mapaddr); |
845 | } else | 845 | } else |
846 | offset += fuse_copy_do(cs, NULL, &count); | 846 | offset += fuse_copy_do(cs, NULL, &count); |
847 | } | 847 | } |
diff --git a/fs/fuse/file.c b/fs/fuse/file.c index 8ca007d09c96..504e61b7fd75 100644 --- a/fs/fuse/file.c +++ b/fs/fuse/file.c | |||
@@ -1930,11 +1930,11 @@ long fuse_do_ioctl(struct file *file, unsigned int cmd, unsigned long arg, | |||
1930 | in_iovs + out_iovs > FUSE_IOCTL_MAX_IOV) | 1930 | in_iovs + out_iovs > FUSE_IOCTL_MAX_IOV) |
1931 | goto out; | 1931 | goto out; |
1932 | 1932 | ||
1933 | vaddr = kmap_atomic(pages[0], KM_USER0); | 1933 | vaddr = kmap_atomic(pages[0]); |
1934 | err = fuse_copy_ioctl_iovec(fc, iov_page, vaddr, | 1934 | err = fuse_copy_ioctl_iovec(fc, iov_page, vaddr, |
1935 | transferred, in_iovs + out_iovs, | 1935 | transferred, in_iovs + out_iovs, |
1936 | (flags & FUSE_IOCTL_COMPAT) != 0); | 1936 | (flags & FUSE_IOCTL_COMPAT) != 0); |
1937 | kunmap_atomic(vaddr, KM_USER0); | 1937 | kunmap_atomic(vaddr); |
1938 | if (err) | 1938 | if (err) |
1939 | goto out; | 1939 | goto out; |
1940 | 1940 | ||
diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c index c9a0c972a4b2..26783eb2b1fc 100644 --- a/fs/fuse/inode.c +++ b/fs/fuse/inode.c | |||
@@ -989,14 +989,9 @@ static int fuse_fill_super(struct super_block *sb, void *data, int silent) | |||
989 | 989 | ||
990 | err = -ENOMEM; | 990 | err = -ENOMEM; |
991 | root = fuse_get_root_inode(sb, d.rootmode); | 991 | root = fuse_get_root_inode(sb, d.rootmode); |
992 | if (!root) | 992 | root_dentry = d_make_root(root); |
993 | if (!root_dentry) | ||
993 | goto err_put_conn; | 994 | goto err_put_conn; |
994 | |||
995 | root_dentry = d_alloc_root(root); | ||
996 | if (!root_dentry) { | ||
997 | iput(root); | ||
998 | goto err_put_conn; | ||
999 | } | ||
1000 | /* only now - we want root dentry with NULL ->d_op */ | 995 | /* only now - we want root dentry with NULL ->d_op */ |
1001 | sb->s_d_op = &fuse_dentry_operations; | 996 | sb->s_d_op = &fuse_dentry_operations; |
1002 | 997 | ||