summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorLiu Bo <bo.li.liu@oracle.com>2016-05-13 17:06:59 -0700
committerDavid Sterba <dsterba@suse.com>2016-05-25 19:53:51 +0200
commit1c8b5b6e8b570a8038fa42cf9e7c23782bd4882c (patch)
treedcf4a5e8e19dbe95e21d207505372e56ce1eff7b /fs
parentc315ef8d9db7f1a0ebd023a395ebdfde1c68057e (diff)
downloadlinux-stable-1c8b5b6e8b570a8038fa42cf9e7c23782bd4882c.tar.gz
linux-stable-1c8b5b6e8b570a8038fa42cf9e7c23782bd4882c.tar.bz2
linux-stable-1c8b5b6e8b570a8038fa42cf9e7c23782bd4882c.zip
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 <bo.li.liu@oracle.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/btrfs/volumes.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index e0290303bb35..fd3e8280b549 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;
}