aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Mason <clm@fb.com>2014-05-19 23:55:27 -0400
committerChris Mason <clm@fb.com>2014-06-09 20:20:56 -0400
commit0e378df15cd87f540f1ba9503e4aa039e1c72741 (patch)
tree700aee195982d5795f02bdda3038e28c7910484d
parentd4452bc526c431a882cc6ba854619e166cb7dfe4 (diff)
Btrfs: cut down stack usage in btree_write_cache_pages
This adds noinline_for_stack to two helpers used by btree_write_cache_pages. It shaves us down from 424 bytes on the stack to 280. Signed-off-by: Chris Mason <clm@fb.com>
-rw-r--r--fs/btrfs/extent_io.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index 0f425dea4523..51299c261d56 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -3393,9 +3393,10 @@ void wait_on_extent_buffer_writeback(struct extent_buffer *eb)
3393 TASK_UNINTERRUPTIBLE); 3393 TASK_UNINTERRUPTIBLE);
3394} 3394}
3395 3395
3396static int lock_extent_buffer_for_io(struct extent_buffer *eb, 3396static noinline_for_stack int
3397 struct btrfs_fs_info *fs_info, 3397lock_extent_buffer_for_io(struct extent_buffer *eb,
3398 struct extent_page_data *epd) 3398 struct btrfs_fs_info *fs_info,
3399 struct extent_page_data *epd)
3399{ 3400{
3400 unsigned long i, num_pages; 3401 unsigned long i, num_pages;
3401 int flush = 0; 3402 int flush = 0;
@@ -3500,7 +3501,7 @@ static void end_bio_extent_buffer_writepage(struct bio *bio, int err)
3500 bio_put(bio); 3501 bio_put(bio);
3501} 3502}
3502 3503
3503static int write_one_eb(struct extent_buffer *eb, 3504static noinline_for_stack int write_one_eb(struct extent_buffer *eb,
3504 struct btrfs_fs_info *fs_info, 3505 struct btrfs_fs_info *fs_info,
3505 struct writeback_control *wbc, 3506 struct writeback_control *wbc,
3506 struct extent_page_data *epd) 3507 struct extent_page_data *epd)