diff options
Diffstat (limited to 'fs/btrfs')
-rw-r--r-- | fs/btrfs/acl.c | 2 | ||||
-rw-r--r-- | fs/btrfs/ctree.h | 2 | ||||
-rw-r--r-- | fs/btrfs/disk-io.c | 2 | ||||
-rw-r--r-- | fs/btrfs/inode.c | 12 | ||||
-rw-r--r-- | fs/btrfs/ioctl.c | 2 |
5 files changed, 13 insertions, 7 deletions
diff --git a/fs/btrfs/acl.c b/fs/btrfs/acl.c index 1d53b62dbba5..7fdd184a528d 100644 --- a/fs/btrfs/acl.c +++ b/fs/btrfs/acl.c | |||
@@ -256,7 +256,7 @@ int btrfs_init_acl(struct inode *inode, struct inode *dir) | |||
256 | } | 256 | } |
257 | 257 | ||
258 | if (!acl) | 258 | if (!acl) |
259 | inode->i_mode &= ~current->fs->umask; | 259 | inode->i_mode &= ~current_umask(); |
260 | } | 260 | } |
261 | 261 | ||
262 | if (IS_POSIXACL(dir) && acl) { | 262 | if (IS_POSIXACL(dir) && acl) { |
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index 8f4e152bb11b..ad96495dedc5 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h | |||
@@ -2132,7 +2132,7 @@ int btrfs_merge_bio_hook(struct page *page, unsigned long offset, | |||
2132 | unsigned long btrfs_force_ra(struct address_space *mapping, | 2132 | unsigned long btrfs_force_ra(struct address_space *mapping, |
2133 | struct file_ra_state *ra, struct file *file, | 2133 | struct file_ra_state *ra, struct file *file, |
2134 | pgoff_t offset, pgoff_t last_index); | 2134 | pgoff_t offset, pgoff_t last_index); |
2135 | int btrfs_page_mkwrite(struct vm_area_struct *vma, struct page *page); | 2135 | int btrfs_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf); |
2136 | int btrfs_readpage(struct file *file, struct page *page); | 2136 | int btrfs_readpage(struct file *file, struct page *page); |
2137 | void btrfs_delete_inode(struct inode *inode); | 2137 | void btrfs_delete_inode(struct inode *inode); |
2138 | void btrfs_put_inode(struct inode *inode); | 2138 | void btrfs_put_inode(struct inode *inode); |
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index a850c3ac196d..92caa8035f36 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c | |||
@@ -2409,7 +2409,7 @@ void btrfs_btree_balance_dirty(struct btrfs_root *root, unsigned long nr) | |||
2409 | unsigned long thresh = 32 * 1024 * 1024; | 2409 | unsigned long thresh = 32 * 1024 * 1024; |
2410 | tree = &BTRFS_I(root->fs_info->btree_inode)->io_tree; | 2410 | tree = &BTRFS_I(root->fs_info->btree_inode)->io_tree; |
2411 | 2411 | ||
2412 | if (current_is_pdflush() || current->flags & PF_MEMALLOC) | 2412 | if (current->flags & PF_MEMALLOC) |
2413 | return; | 2413 | return; |
2414 | 2414 | ||
2415 | num_dirty = count_range_bits(tree, &start, (u64)-1, | 2415 | num_dirty = count_range_bits(tree, &start, (u64)-1, |
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 0ecb3fa75dc3..a0d1dd492a58 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c | |||
@@ -4368,8 +4368,9 @@ static void btrfs_invalidatepage(struct page *page, unsigned long offset) | |||
4368 | * beyond EOF, then the page is guaranteed safe against truncation until we | 4368 | * beyond EOF, then the page is guaranteed safe against truncation until we |
4369 | * unlock the page. | 4369 | * unlock the page. |
4370 | */ | 4370 | */ |
4371 | int btrfs_page_mkwrite(struct vm_area_struct *vma, struct page *page) | 4371 | int btrfs_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf) |
4372 | { | 4372 | { |
4373 | struct page *page = vmf->page; | ||
4373 | struct inode *inode = fdentry(vma->vm_file)->d_inode; | 4374 | struct inode *inode = fdentry(vma->vm_file)->d_inode; |
4374 | struct btrfs_root *root = BTRFS_I(inode)->root; | 4375 | struct btrfs_root *root = BTRFS_I(inode)->root; |
4375 | struct extent_io_tree *io_tree = &BTRFS_I(inode)->io_tree; | 4376 | struct extent_io_tree *io_tree = &BTRFS_I(inode)->io_tree; |
@@ -4382,10 +4383,15 @@ int btrfs_page_mkwrite(struct vm_area_struct *vma, struct page *page) | |||
4382 | u64 page_end; | 4383 | u64 page_end; |
4383 | 4384 | ||
4384 | ret = btrfs_check_data_free_space(root, inode, PAGE_CACHE_SIZE); | 4385 | ret = btrfs_check_data_free_space(root, inode, PAGE_CACHE_SIZE); |
4385 | if (ret) | 4386 | if (ret) { |
4387 | if (ret == -ENOMEM) | ||
4388 | ret = VM_FAULT_OOM; | ||
4389 | else /* -ENOSPC, -EIO, etc */ | ||
4390 | ret = VM_FAULT_SIGBUS; | ||
4386 | goto out; | 4391 | goto out; |
4392 | } | ||
4387 | 4393 | ||
4388 | ret = -EINVAL; | 4394 | ret = VM_FAULT_NOPAGE; /* make the VM retry the fault */ |
4389 | again: | 4395 | again: |
4390 | lock_page(page); | 4396 | lock_page(page); |
4391 | size = i_size_read(inode); | 4397 | size = i_size_read(inode); |
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index bca729fc80c8..7594bec1be10 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c | |||
@@ -267,7 +267,7 @@ static noinline int btrfs_mksubvol(struct path *parent, char *name, | |||
267 | goto out_dput; | 267 | goto out_dput; |
268 | 268 | ||
269 | if (!IS_POSIXACL(parent->dentry->d_inode)) | 269 | if (!IS_POSIXACL(parent->dentry->d_inode)) |
270 | mode &= ~current->fs->umask; | 270 | mode &= ~current_umask(); |
271 | 271 | ||
272 | error = mnt_want_write(parent->mnt); | 272 | error = mnt_want_write(parent->mnt); |
273 | if (error) | 273 | if (error) |