summaryrefslogtreecommitdiffstats
path: root/fs/btrfs
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2016-05-25 22:51:02 +0200
committerDavid Sterba <dsterba@suse.com>2016-05-25 22:51:02 +0200
commite73440868fde7cce4a93583a4fa2db9a8938a7ed (patch)
tree4149ed8954a0c344b354769d1c9bbed9a8e54114 /fs/btrfs
parentc315ef8d9db7f1a0ebd023a395ebdfde1c68057e (diff)
parentf1fee6534dcfbf468a159789aa202db2bce8c200 (diff)
downloadlinux-stable-e73440868fde7cce4a93583a4fa2db9a8938a7ed.tar.gz
linux-stable-e73440868fde7cce4a93583a4fa2db9a8938a7ed.tar.bz2
linux-stable-e73440868fde7cce4a93583a4fa2db9a8938a7ed.zip
Merge branch 'misc-4.7' into for-chris-4.7-20160525
Diffstat (limited to 'fs/btrfs')
-rw-r--r--fs/btrfs/extent_io.c6
-rw-r--r--fs/btrfs/scrub.c3
-rw-r--r--fs/btrfs/volumes.c4
3 files changed, 9 insertions, 4 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index 2f83448d34fe..f661688c2102 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -4389,8 +4389,12 @@ int extent_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo,
if (ret < 0) {
btrfs_free_path(path);
return ret;
+ } else {
+ WARN_ON(!ret);
+ if (ret == 1)
+ ret = 0;
}
- WARN_ON(!ret);
+
path->slots[0]--;
btrfs_item_key_to_cpu(path->nodes[0], &found_key, path->slots[0]);
found_type = found_key.type;
diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c
index fa35cdc46494..ab3b9d604919 100644
--- a/fs/btrfs/scrub.c
+++ b/fs/btrfs/scrub.c
@@ -2181,7 +2181,7 @@ static void scrub_missing_raid56_pages(struct scrub_block *sblock)
struct btrfs_fs_info *fs_info = sctx->dev_root->fs_info;
u64 length = sblock->page_count * PAGE_SIZE;
u64 logical = sblock->pagev[0]->logical;
- struct btrfs_bio *bbio;
+ struct btrfs_bio *bbio = NULL;
struct bio *bio;
struct btrfs_raid_bio *rbio;
int ret;
@@ -2982,6 +2982,7 @@ again:
extent_len);
mapped_length = extent_len;
+ bbio = NULL;
ret = btrfs_map_block(fs_info, READ, extent_logical,
&mapped_length, &bbio, 0);
if (!ret) {
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;
}