From: Liu Bo Date: Sat, 14 May 2016 00:06:59 +0000 (-0700) Subject: Btrfs: free sys_array eb as soon as possible X-Git-Tag: v4.9.8~1839^2~13^2~2^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1c8b5b6e8b570a8038fa42cf9e7c23782bd4882c;p=platform%2Fkernel%2Flinux-rpi3.git Btrfs: free sys_array eb as soon as possible While reading sys_chunk_array in superblock, btrfs creates a temporary extent buffer. Since we don't use it after finishing reading sys_chunk_array, we don't need to keep it in memory. Signed-off-by: Liu Bo Signed-off-by: David Sterba --- diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index e029030..fd3e828 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -6630,13 +6630,13 @@ int btrfs_read_sys_array(struct btrfs_root *root) sb_array_offset += len; cur_offset += len; } - free_extent_buffer(sb); + free_extent_buffer_stale(sb); return ret; out_short_read: printk(KERN_ERR "BTRFS: sys_array too short to read %u bytes at offset %u\n", len, cur_offset); - free_extent_buffer(sb); + free_extent_buffer_stale(sb); return -EIO; }