diff options
author | Chris Mason <chris.mason@oracle.com> | 2011-07-27 22:13:10 +0200 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2011-07-27 22:18:13 +0200 |
commit | ff95acb6733d41a8d45feb0e18b96df25e610e78 (patch) | |
tree | e20983c579c9095970aefa9cb176a9df0654d1e4 /fs/btrfs/ioctl.c | |
parent | Linux 3.0 (diff) | |
parent | Btrfs: make sure reserve_metadata_bytes doesn't leak out strange errors (diff) | |
download | linux-ff95acb6733d41a8d45feb0e18b96df25e610e78.tar.xz linux-ff95acb6733d41a8d45feb0e18b96df25e610e78.zip |
Merge branch 'integration' into for-linus
Diffstat (limited to 'fs/btrfs/ioctl.c')
-rw-r--r-- | fs/btrfs/ioctl.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index a3c4751e07db..fd252fff4c66 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -867,8 +867,8 @@ again: /* step one, lock all the pages */ for (i = 0; i < num_pages; i++) { struct page *page; - page = grab_cache_page(inode->i_mapping, - start_index + i); + page = find_or_create_page(inode->i_mapping, + start_index + i, GFP_NOFS); if (!page) break; @@ -938,7 +938,9 @@ again: GFP_NOFS); if (i_done != num_pages) { - atomic_inc(&BTRFS_I(inode)->outstanding_extents); + spin_lock(&BTRFS_I(inode)->lock); + BTRFS_I(inode)->outstanding_extents++; + spin_unlock(&BTRFS_I(inode)->lock); btrfs_delalloc_release_space(inode, (num_pages - i_done) << PAGE_CACHE_SHIFT); } |