diff options
author | David Sterba <dsterba@suse.com> | 2017-12-12 21:43:52 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2018-01-22 16:08:19 +0100 |
commit | e43bbe5e16d87b40f3b382b3a43b0142d6d1193d (patch) | |
tree | b8033e995b23fe1c45f117d3d35117bc7b58772f /fs/btrfs/file.c | |
parent | btrfs: add separate helper for unlock_extent_cached with GFP_ATOMIC (diff) | |
download | linux-e43bbe5e16d87b40f3b382b3a43b0142d6d1193d.tar.xz linux-e43bbe5e16d87b40f3b382b3a43b0142d6d1193d.zip |
btrfs: sink unlock_extent parameter gfp_flags
All callers pass either GFP_NOFS or GFP_KERNEL now, so we can sink the
parameter to the function, though we lose some of the slightly better
semantics of GFP_KERNEL in some places, it's worth cleaning up the
callchains.
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/file.c')
-rw-r--r-- | fs/btrfs/file.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index 1096398e1351..1ed2e6e9e204 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c @@ -1504,7 +1504,7 @@ lock_and_cleanup_extent_if_need(struct btrfs_inode *inode, struct page **pages, ordered->file_offset + ordered->len > start_pos && ordered->file_offset <= last_pos) { unlock_extent_cached(&inode->io_tree, start_pos, - last_pos, cached_state, GFP_NOFS); + last_pos, cached_state); for (i = 0; i < num_pages; i++) { unlock_page(pages[i]); put_page(pages[i]); @@ -1758,8 +1758,7 @@ again: pos, copied, NULL); if (extents_locked) unlock_extent_cached(&BTRFS_I(inode)->io_tree, - lockstart, lockend, &cached_state, - GFP_NOFS); + lockstart, lockend, &cached_state); btrfs_delalloc_release_extents(BTRFS_I(inode), reserve_bytes); if (ret) { btrfs_drop_pages(pages, num_pages); @@ -2600,7 +2599,7 @@ static int btrfs_punch_hole(struct inode *inode, loff_t offset, loff_t len) if (ordered) btrfs_put_ordered_extent(ordered); unlock_extent_cached(&BTRFS_I(inode)->io_tree, lockstart, - lockend, &cached_state, GFP_NOFS); + lockend, &cached_state); ret = btrfs_wait_ordered_range(inode, lockstart, lockend - lockstart + 1); if (ret) { @@ -2751,7 +2750,7 @@ out_free: btrfs_free_block_rsv(fs_info, rsv); out: unlock_extent_cached(&BTRFS_I(inode)->io_tree, lockstart, lockend, - &cached_state, GFP_NOFS); + &cached_state); out_only_mutex: if (!updated_inode && truncated_block && !ret && !err) { /* @@ -2913,7 +2912,7 @@ static long btrfs_fallocate(struct file *file, int mode, btrfs_put_ordered_extent(ordered); unlock_extent_cached(&BTRFS_I(inode)->io_tree, alloc_start, locked_end, - &cached_state, GFP_KERNEL); + &cached_state); /* * we can't wait on the range with the transaction * running or with the extent lock held @@ -3015,7 +3014,7 @@ static long btrfs_fallocate(struct file *file, int mode, } out_unlock: unlock_extent_cached(&BTRFS_I(inode)->io_tree, alloc_start, locked_end, - &cached_state, GFP_KERNEL); + &cached_state); out: inode_unlock(inode); /* Let go of our reservation. */ @@ -3088,7 +3087,7 @@ static int find_desired_extent(struct inode *inode, loff_t *offset, int whence) *offset = min_t(loff_t, start, inode->i_size); } unlock_extent_cached(&BTRFS_I(inode)->io_tree, lockstart, lockend, - &cached_state, GFP_NOFS); + &cached_state); return ret; } |