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

Merge tag 'for-6.19-rc7-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux

Pull btrfs fixes from David Sterba:

- fix leaked folio refcount on s390x when using hw zlib compression
acceleration

- remove own threshold from ->writepages() which could collide with
cgroup limits and lead to a deadlock when metadadata are not written
because the amount is under the internal limit

* tag 'for-6.19-rc7-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
btrfs: zlib: fix the folio leak on S390 hardware acceleration
btrfs: do not strictly require dirty metadata threshold for metadata writepages

+3 -26
-22
fs/btrfs/disk-io.c
··· 498 498 #define btree_migrate_folio NULL 499 499 #endif 500 500 501 - static int btree_writepages(struct address_space *mapping, 502 - struct writeback_control *wbc) 503 - { 504 - int ret; 505 - 506 - if (wbc->sync_mode == WB_SYNC_NONE) { 507 - struct btrfs_fs_info *fs_info; 508 - 509 - if (wbc->for_kupdate) 510 - return 0; 511 - 512 - fs_info = inode_to_fs_info(mapping->host); 513 - /* this is a bit racy, but that's ok */ 514 - ret = __percpu_counter_compare(&fs_info->dirty_metadata_bytes, 515 - BTRFS_DIRTY_METADATA_THRESH, 516 - fs_info->dirty_metadata_batch); 517 - if (ret < 0) 518 - return 0; 519 - } 520 - return btree_write_cache_pages(mapping, wbc); 521 - } 522 - 523 501 static bool btree_release_folio(struct folio *folio, gfp_t gfp_flags) 524 502 { 525 503 if (folio_test_writeback(folio) || folio_test_dirty(folio))
+1 -2
fs/btrfs/extent_io.c
··· 2286 2286 } 2287 2287 } 2288 2288 2289 - int btree_write_cache_pages(struct address_space *mapping, 2290 - struct writeback_control *wbc) 2289 + int btree_writepages(struct address_space *mapping, struct writeback_control *wbc) 2291 2290 { 2292 2291 struct btrfs_eb_write_context ctx = { .wbc = wbc }; 2293 2292 struct btrfs_fs_info *fs_info = inode_to_fs_info(mapping->host);
+1 -2
fs/btrfs/extent_io.h
··· 237 237 u64 start, u64 end, struct writeback_control *wbc, 238 238 bool pages_dirty); 239 239 int btrfs_writepages(struct address_space *mapping, struct writeback_control *wbc); 240 - int btree_write_cache_pages(struct address_space *mapping, 241 - struct writeback_control *wbc); 240 + int btree_writepages(struct address_space *mapping, struct writeback_control *wbc); 242 241 void btrfs_btree_wait_writeback_range(struct btrfs_fs_info *fs_info, u64 start, u64 end); 243 242 void btrfs_readahead(struct readahead_control *rac); 244 243 int set_folio_extent_mapped(struct folio *folio);
+1
fs/btrfs/zlib.c
··· 139 139 data_in = kmap_local_folio(folio, offset); 140 140 memcpy(workspace->buf + cur - filepos, data_in, copy_length); 141 141 kunmap_local(data_in); 142 + folio_put(folio); 142 143 cur += copy_length; 143 144 } 144 145 return 0;