forked from luck/tmp_suning_uos_patched
for-5.8-rc4-tag
-----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEE8rQSAMVO+zA4DBdWxWXV+ddtWDsFAl8K3ugACgkQxWXV+ddt WDsDNBAAn5iaMNwlCBYpwAaWlltMog3SKg+vgpEcFD9qLlmimW/1TlrjjGRzp6Mn nnNp+YjYDotqU9pP1OwESpY1LTzuVQlQL1yaiPLrehw/WsZgjdDWBk/EyU0n1vz1 Sr5wcyCVyVZZyO2/BEVTDhkvu+sj9Rcwo2QCsC2aIOTVSfQGFSklMp2VNdu2YQBy zyTOhbwpn3OPPZsvScEujvSY9oUAN3J8WYA9jmgtwjZD7sr6UNyNI9vy8woi0VAQ Uo7nXc43ZcS1xTwziGOpC6fZi90zrF7ZvfFT0qY92EEDcAQcCzPDl6f4OnAjr6/b rnZcLvusEcENjFQn3pD7fCuXiIRrN8eHspj5+K/oRBTXWC5AykBwsLWt7M+tTMYa ljEBRZlQlHMlC3xSEZNDccEvScXrEIu3Q2WrTOTXSgXi4e3q89VUTEIjAhfnTTzJ VwHhGZIB6o+V7wZ0EhWdt9b1/Ro/AcADddV+AxTsfC1YCHVZOsSSa3DxV243ORsA /U3t2a4SMp/iSHTtoLIwbr/O1Uj9UaOk2n1DcNbGIgdn14yYt6YWOhvrOPBampEa zfBzmAOx9r5Mf2wWD0iTm4gJEZsrB+IpboYZ6cuBcOI29+A4k0POBfRLXgf8/jMo 5kBWm+C3KKkZO8u/Z4gtVG1ZFdxsnYAc+q+UXS5ZSJMH+++UoZQ= =hTok -----END PGP SIGNATURE----- Merge tag 'for-5.8-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: "Two refcounting fixes and one prepartory patch for upcoming splice cleanup: - fix double put of block group with nodatacow - fix missing block group put when remounting with discard=async - explicitly set splice callback (no functional change), to ease integrating splice cleanup patches" * tag 'for-5.8-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: wire up iter_file_splice_write btrfs: fix double put of block group with nocow btrfs: discard: add missing put when grabbing block group from unused list
This commit is contained in:
commit
72c34e8d70
|
@ -619,6 +619,7 @@ void btrfs_discard_punt_unused_bgs_list(struct btrfs_fs_info *fs_info)
|
|||
list_for_each_entry_safe(block_group, next, &fs_info->unused_bgs,
|
||||
bg_list) {
|
||||
list_del_init(&block_group->bg_list);
|
||||
btrfs_put_block_group(block_group);
|
||||
btrfs_discard_queue_work(&fs_info->discard_ctl, block_group);
|
||||
}
|
||||
spin_unlock(&fs_info->unused_bgs_lock);
|
||||
|
|
|
@ -3509,6 +3509,7 @@ const struct file_operations btrfs_file_operations = {
|
|||
.read_iter = generic_file_read_iter,
|
||||
.splice_read = generic_file_splice_read,
|
||||
.write_iter = btrfs_file_write_iter,
|
||||
.splice_write = iter_file_splice_write,
|
||||
.mmap = btrfs_file_mmap,
|
||||
.open = btrfs_file_open,
|
||||
.release = btrfs_release_file,
|
||||
|
|
|
@ -1690,12 +1690,8 @@ static noinline int run_delalloc_nocow(struct inode *inode,
|
|||
ret = fallback_to_cow(inode, locked_page, cow_start,
|
||||
found_key.offset - 1,
|
||||
page_started, nr_written);
|
||||
if (ret) {
|
||||
if (nocow)
|
||||
btrfs_dec_nocow_writers(fs_info,
|
||||
disk_bytenr);
|
||||
if (ret)
|
||||
goto error;
|
||||
}
|
||||
cow_start = (u64)-1;
|
||||
}
|
||||
|
||||
|
@ -1711,9 +1707,6 @@ static noinline int run_delalloc_nocow(struct inode *inode,
|
|||
ram_bytes, BTRFS_COMPRESS_NONE,
|
||||
BTRFS_ORDERED_PREALLOC);
|
||||
if (IS_ERR(em)) {
|
||||
if (nocow)
|
||||
btrfs_dec_nocow_writers(fs_info,
|
||||
disk_bytenr);
|
||||
ret = PTR_ERR(em);
|
||||
goto error;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user