Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+5 -4
+5 -4
fs/btrfs/extent_io.c
··· 3393 3393 TASK_UNINTERRUPTIBLE); 3394 3394 } 3395 3395 3396 - static int lock_extent_buffer_for_io(struct extent_buffer *eb, 3397 - struct btrfs_fs_info *fs_info, 3398 - struct extent_page_data *epd) 3396 + static noinline_for_stack int 3397 + lock_extent_buffer_for_io(struct extent_buffer *eb, 3398 + struct btrfs_fs_info *fs_info, 3399 + struct extent_page_data *epd) 3399 3400 { 3400 3401 unsigned long i, num_pages; 3401 3402 int flush = 0; ··· 3501 3500 bio_put(bio); 3502 3501 } 3503 3502 3504 - static int write_one_eb(struct extent_buffer *eb, 3503 + static noinline_for_stack int write_one_eb(struct extent_buffer *eb, 3505 3504 struct btrfs_fs_info *fs_info, 3506 3505 struct writeback_control *wbc, 3507 3506 struct extent_page_data *epd)