inode.c (4aec2b52327b3a3a20faa3f1af3102c0d97c7c92) | inode.c (190662b2128dd648749e197f5563e9f6bbb5e05c) |
---|---|
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, --- 784 unchanged lines hidden (view full) --- 793 size_t zero_start) 794{ 795 char *kaddr; 796 int ret = 0; 797 struct extent_map_tree *em_tree = &BTRFS_I(inode)->extent_tree; 798 u64 page_start = (u64)page->index << PAGE_CACHE_SHIFT; 799 u64 page_end = page_start + PAGE_CACHE_SIZE - 1; 800 | 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, --- 784 unchanged lines hidden (view full) --- 793 size_t zero_start) 794{ 795 char *kaddr; 796 int ret = 0; 797 struct extent_map_tree *em_tree = &BTRFS_I(inode)->extent_tree; 798 u64 page_start = (u64)page->index << PAGE_CACHE_SHIFT; 799 u64 page_end = page_start + PAGE_CACHE_SIZE - 1; 800 |
801 WARN_ON(!PageLocked(page)); |
|
801 set_page_extent_mapped(page); 802 803 lock_extent(em_tree, page_start, page_end, GFP_NOFS); 804 set_extent_delalloc(&BTRFS_I(inode)->extent_tree, page_start, 805 page_end, GFP_NOFS); 806 if (zero_start != PAGE_CACHE_SIZE) { 807 kaddr = kmap(page); 808 memset(kaddr + zero_start, 0, PAGE_CACHE_SIZE - zero_start); --- 1927 unchanged lines hidden --- | 802 set_page_extent_mapped(page); 803 804 lock_extent(em_tree, page_start, page_end, GFP_NOFS); 805 set_extent_delalloc(&BTRFS_I(inode)->extent_tree, page_start, 806 page_end, GFP_NOFS); 807 if (zero_start != PAGE_CACHE_SIZE) { 808 kaddr = kmap(page); 809 memset(kaddr + zero_start, 0, PAGE_CACHE_SIZE - zero_start); --- 1927 unchanged lines hidden --- |