ioctl.c (9785dbdf265ddc47d5c88267d89a97648c0dc14b) ioctl.c (f248679e86fead40cc78e724c7181d6bec1a2046)
1/*
2 * Copyright (C) 2007 Oracle. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public
6 * License v2 as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,

--- 854 unchanged lines hidden (view full) ---

863 struct btrfs_ordered_extent *ordered;
864 struct extent_state *cached_state = NULL;
865 gfp_t mask = btrfs_alloc_write_mask(inode->i_mapping);
866
867 if (isize == 0)
868 return 0;
869 file_end = (isize - 1) >> PAGE_CACHE_SHIFT;
870
1/*
2 * Copyright (C) 2007 Oracle. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public
6 * License v2 as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,

--- 854 unchanged lines hidden (view full) ---

863 struct btrfs_ordered_extent *ordered;
864 struct extent_state *cached_state = NULL;
865 gfp_t mask = btrfs_alloc_write_mask(inode->i_mapping);
866
867 if (isize == 0)
868 return 0;
869 file_end = (isize - 1) >> PAGE_CACHE_SHIFT;
870
871 mutex_lock(&inode->i_mutex);
872 ret = btrfs_delalloc_reserve_space(inode,
873 num_pages << PAGE_CACHE_SHIFT);
871 ret = btrfs_delalloc_reserve_space(inode,
872 num_pages << PAGE_CACHE_SHIFT);
874 mutex_unlock(&inode->i_mutex);
875 if (ret)
876 return ret;
877again:
878 ret = 0;
879 i_done = 0;
880
881 /* step one, lock all the pages */
882 for (i = 0; i < num_pages; i++) {

--- 2441 unchanged lines hidden ---
873 if (ret)
874 return ret;
875again:
876 ret = 0;
877 i_done = 0;
878
879 /* step one, lock all the pages */
880 for (i = 0; i < num_pages; i++) {

--- 2441 unchanged lines hidden ---