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 'zonefs-5.10-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/zonefs

Pull zonefs fix from Damien Le Moal:
"A single patch in this pull request to fix a BIO and page reference
leak when writing sequential zone files"

* tag 'zonefs-5.10-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/zonefs:
zonefs: fix page reference and BIO leak

+8 -6
+8 -6
fs/zonefs/super.c
··· 691 691 bio->bi_opf |= REQ_FUA; 692 692 693 693 ret = bio_iov_iter_get_pages(bio, from); 694 - if (unlikely(ret)) { 695 - bio_io_error(bio); 696 - return ret; 697 - } 694 + if (unlikely(ret)) 695 + goto out_release; 696 + 698 697 size = bio->bi_iter.bi_size; 699 - task_io_account_write(ret); 698 + task_io_account_write(size); 700 699 701 700 if (iocb->ki_flags & IOCB_HIPRI) 702 701 bio_set_polled(bio, iocb); 703 702 704 703 ret = submit_bio_wait(bio); 705 704 705 + zonefs_file_write_dio_end_io(iocb, size, ret, 0); 706 + 707 + out_release: 708 + bio_release_pages(bio, false); 706 709 bio_put(bio); 707 710 708 - zonefs_file_write_dio_end_io(iocb, size, ret, 0); 709 711 if (ret >= 0) { 710 712 iocb->ki_pos += size; 711 713 return size;