mirror of
https://github.com/Dasharo/linux.git
synced 2026-03-06 15:25:10 -08:00
Merge tag 'for-6.14-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux
Pull btrfs fixes from David Sterba: - fix leaked extent map after error when reading chunks - replace use of deprecated strncpy - in zoned mode, fixed range when ulocking extent range, causing a hang * tag 'for-6.14-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: fix a leaked chunk map issue in read_one_chunk() btrfs: replace deprecated strncpy() with strscpy() btrfs: zoned: fix extent range end unlock in cow_file_range()
This commit is contained in:
@@ -1382,8 +1382,13 @@ static noinline int cow_file_range(struct btrfs_inode *inode,
|
||||
continue;
|
||||
}
|
||||
if (done_offset) {
|
||||
*done_offset = start - 1;
|
||||
return 0;
|
||||
/*
|
||||
* Move @end to the end of the processed range,
|
||||
* and exit the loop to unlock the processed extents.
|
||||
*/
|
||||
end = start - 1;
|
||||
ret = 0;
|
||||
break;
|
||||
}
|
||||
ret = -ENOSPC;
|
||||
}
|
||||
|
||||
@@ -1330,13 +1330,13 @@ MODULE_PARM_DESC(read_policy,
|
||||
|
||||
int btrfs_read_policy_to_enum(const char *str, s64 *value_ret)
|
||||
{
|
||||
char param[32] = { 0 };
|
||||
char param[32];
|
||||
char __maybe_unused *value_str;
|
||||
|
||||
if (!str || strlen(str) == 0)
|
||||
return 0;
|
||||
|
||||
strncpy(param, str, sizeof(param) - 1);
|
||||
strscpy(param, str);
|
||||
|
||||
#ifdef CONFIG_BTRFS_EXPERIMENTAL
|
||||
/* Separate value from input in policy:value format. */
|
||||
|
||||
@@ -7155,6 +7155,7 @@ static int read_one_chunk(struct btrfs_key *key, struct extent_buffer *leaf,
|
||||
btrfs_err(fs_info,
|
||||
"failed to add chunk map, start=%llu len=%llu: %d",
|
||||
map->start, map->chunk_len, ret);
|
||||
btrfs_free_chunk_map(map);
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
||||
Reference in New Issue
Block a user