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

Configure Feed

Select the types of activity you want to include in your feed.

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()

+10 -4
+7 -2
fs/btrfs/inode.c
··· 1382 1382 continue; 1383 1383 } 1384 1384 if (done_offset) { 1385 - *done_offset = start - 1; 1386 - return 0; 1385 + /* 1386 + * Move @end to the end of the processed range, 1387 + * and exit the loop to unlock the processed extents. 1388 + */ 1389 + end = start - 1; 1390 + ret = 0; 1391 + break; 1387 1392 } 1388 1393 ret = -ENOSPC; 1389 1394 }
+2 -2
fs/btrfs/sysfs.c
··· 1330 1330 1331 1331 int btrfs_read_policy_to_enum(const char *str, s64 *value_ret) 1332 1332 { 1333 - char param[32] = { 0 }; 1333 + char param[32]; 1334 1334 char __maybe_unused *value_str; 1335 1335 1336 1336 if (!str || strlen(str) == 0) 1337 1337 return 0; 1338 1338 1339 - strncpy(param, str, sizeof(param) - 1); 1339 + strscpy(param, str); 1340 1340 1341 1341 #ifdef CONFIG_BTRFS_EXPERIMENTAL 1342 1342 /* Separate value from input in policy:value format. */
+1
fs/btrfs/volumes.c
··· 7155 7155 btrfs_err(fs_info, 7156 7156 "failed to add chunk map, start=%llu len=%llu: %d", 7157 7157 map->start, map->chunk_len, ret); 7158 + btrfs_free_chunk_map(map); 7158 7159 } 7159 7160 7160 7161 return ret;