aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ioctl.c
diff options
context:
space:
mode:
authorJeff Mahoney <jeffm@suse.com>2012-03-01 08:57:19 -0500
committerDavid Sterba <dsterba@suse.cz>2012-03-21 20:45:35 -0400
commitd0082371cf086e0ba2bbd0367b2c9920532df24f (patch)
tree4ae3fb6565f36fd606ab6e4b83d489e66b3b86d7 /fs/btrfs/ioctl.c
parent143bede527b054a271053f41bfaca2b57baa9408 (diff)
btrfs: drop gfp_t from lock_extent
lock_extent and unlock_extent are always called with GFP_NOFS, drop the argument and use GFP_NOFS consistently. Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Diffstat (limited to 'fs/btrfs/ioctl.c')
-rw-r--r--fs/btrfs/ioctl.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index d8b54715c2de..4e5149461435 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -797,9 +797,9 @@ static int should_defrag_range(struct inode *inode, u64 start, u64 len,
797 797
798 if (!em) { 798 if (!em) {
799 /* get the big lock and read metadata off disk */ 799 /* get the big lock and read metadata off disk */
800 lock_extent(io_tree, start, start + len - 1, GFP_NOFS); 800 lock_extent(io_tree, start, start + len - 1);
801 em = btrfs_get_extent(inode, NULL, 0, start, len, 0); 801 em = btrfs_get_extent(inode, NULL, 0, start, len, 0);
802 unlock_extent(io_tree, start, start + len - 1, GFP_NOFS); 802 unlock_extent(io_tree, start, start + len - 1);
803 803
804 if (IS_ERR(em)) 804 if (IS_ERR(em))
805 return 0; 805 return 0;
@@ -887,10 +887,10 @@ again:
887 page_start = page_offset(page); 887 page_start = page_offset(page);
888 page_end = page_start + PAGE_CACHE_SIZE - 1; 888 page_end = page_start + PAGE_CACHE_SIZE - 1;
889 while (1) { 889 while (1) {
890 lock_extent(tree, page_start, page_end, GFP_NOFS); 890 lock_extent(tree, page_start, page_end);
891 ordered = btrfs_lookup_ordered_extent(inode, 891 ordered = btrfs_lookup_ordered_extent(inode,
892 page_start); 892 page_start);
893 unlock_extent(tree, page_start, page_end, GFP_NOFS); 893 unlock_extent(tree, page_start, page_end);
894 if (!ordered) 894 if (!ordered)
895 break; 895 break;
896 896
@@ -946,8 +946,7 @@ again:
946 page_end = page_offset(pages[i_done - 1]) + PAGE_CACHE_SIZE; 946 page_end = page_offset(pages[i_done - 1]) + PAGE_CACHE_SIZE;
947 947
948 lock_extent_bits(&BTRFS_I(inode)->io_tree, 948 lock_extent_bits(&BTRFS_I(inode)->io_tree,
949 page_start, page_end - 1, 0, &cached_state, 949 page_start, page_end - 1, 0, &cached_state);
950 GFP_NOFS);
951 clear_extent_bit(&BTRFS_I(inode)->io_tree, page_start, 950 clear_extent_bit(&BTRFS_I(inode)->io_tree, page_start,
952 page_end - 1, EXTENT_DIRTY | EXTENT_DELALLOC | 951 page_end - 1, EXTENT_DIRTY | EXTENT_DELALLOC |
953 EXTENT_DO_ACCOUNTING, 0, 0, &cached_state, 952 EXTENT_DO_ACCOUNTING, 0, 0, &cached_state,
@@ -2326,13 +2325,13 @@ static noinline long btrfs_ioctl_clone(struct file *file, unsigned long srcfd,
2326 another, and lock file content */ 2325 another, and lock file content */
2327 while (1) { 2326 while (1) {
2328 struct btrfs_ordered_extent *ordered; 2327 struct btrfs_ordered_extent *ordered;
2329 lock_extent(&BTRFS_I(src)->io_tree, off, off+len, GFP_NOFS); 2328 lock_extent(&BTRFS_I(src)->io_tree, off, off+len);
2330 ordered = btrfs_lookup_first_ordered_extent(src, off+len); 2329 ordered = btrfs_lookup_first_ordered_extent(src, off+len);
2331 if (!ordered && 2330 if (!ordered &&
2332 !test_range_bit(&BTRFS_I(src)->io_tree, off, off+len, 2331 !test_range_bit(&BTRFS_I(src)->io_tree, off, off+len,
2333 EXTENT_DELALLOC, 0, NULL)) 2332 EXTENT_DELALLOC, 0, NULL))
2334 break; 2333 break;
2335 unlock_extent(&BTRFS_I(src)->io_tree, off, off+len, GFP_NOFS); 2334 unlock_extent(&BTRFS_I(src)->io_tree, off, off+len);
2336 if (ordered) 2335 if (ordered)
2337 btrfs_put_ordered_extent(ordered); 2336 btrfs_put_ordered_extent(ordered);
2338 btrfs_wait_ordered_range(src, off, len); 2337 btrfs_wait_ordered_range(src, off, len);
@@ -2551,7 +2550,7 @@ next:
2551 ret = 0; 2550 ret = 0;
2552out: 2551out:
2553 btrfs_release_path(path); 2552 btrfs_release_path(path);
2554 unlock_extent(&BTRFS_I(src)->io_tree, off, off+len, GFP_NOFS); 2553 unlock_extent(&BTRFS_I(src)->io_tree, off, off+len);
2555out_unlock: 2554out_unlock:
2556 mutex_unlock(&src->i_mutex); 2555 mutex_unlock(&src->i_mutex);
2557 mutex_unlock(&inode->i_mutex); 2556 mutex_unlock(&inode->i_mutex);