[dhowells-fs:netfs-next 23/23] fs/netfs/write_issue.c:783:2: warning: label at end of compound statement is a C23 extension
kernel test robot <[email protected]>
| Newsgroups | dev.linux.lists.llvm,dev.linux.lists.oe-kbuild-all |
|---|---|
| Message-ID | <[email protected]> |
tree: https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git netfs-next head: 796ea75f9f613fed6508719a8a1a71e3b1aededc commit: 796ea75f9f613fed6508719a8a1a71e3b1aededc [23/23] netfs: Combine prepare and issue ops and grab the buffers on request config: x86_64-kexec (https://download.01.org/0day-ci/archive/20260716/[email protected]/config) compiler: clang version 22.1.8 (https://github.com/llvm/llvm-project ca7933e47d3a3451d81e72ac174dcb5aa28b59d1) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260716/[email protected]/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <[email protected]> | Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ All warnings (new ones prefixed by >>): >> fs/netfs/write_issue.c:783:2: warning: label at end of compound statement is a C23 extension [-Wc23-extensions] 783 | } while ((folio = writeback_iter(mapping, wbc, folio, &error))); | ^ 1 warning generated. vim +783 fs/netfs/write_issue.c 1ca4169c391c37 David Howells 2024-10-02 714 288ace2f57c9d0 David Howells 2024-03-18 715 /* 288ace2f57c9d0 David Howells 2024-03-18 716 * Write some of the pending data back to the server 288ace2f57c9d0 David Howells 2024-03-18 717 */ 2df86547b23dab David Howells 2024-03-08 718 int netfs_writepages(struct address_space *mapping, 288ace2f57c9d0 David Howells 2024-03-18 719 struct writeback_control *wbc) 288ace2f57c9d0 David Howells 2024-03-18 720 { 288ace2f57c9d0 David Howells 2024-03-18 721 struct netfs_inode *ictx = netfs_inode(mapping->host); 288ace2f57c9d0 David Howells 2024-03-18 722 struct netfs_io_request *wreq = NULL; 796ea75f9f613f David Howells 2026-04-09 723 struct netfs_wb_params params = {}; 288ace2f57c9d0 David Howells 2024-03-18 724 struct folio *folio; 288ace2f57c9d0 David Howells 2024-03-18 725 int error = 0; 288ace2f57c9d0 David Howells 2024-03-18 726 41376400c4717f David Howells 2026-06-25 727 if (!netfs_wb_begin(ictx, wbc->sync_mode == WB_SYNC_NONE)) 288ace2f57c9d0 David Howells 2024-03-18 728 return 0; 288ace2f57c9d0 David Howells 2024-03-18 729 288ace2f57c9d0 David Howells 2024-03-18 730 /* Need the first folio to be able to set up the op. */ 288ace2f57c9d0 David Howells 2024-03-18 731 folio = writeback_iter(mapping, wbc, NULL, &error); 288ace2f57c9d0 David Howells 2024-03-18 732 if (!folio) 288ace2f57c9d0 David Howells 2024-03-18 733 goto out; 288ace2f57c9d0 David Howells 2024-03-18 734 288ace2f57c9d0 David Howells 2024-03-18 735 wreq = netfs_create_write_req(mapping, NULL, folio_pos(folio), NETFS_WRITEBACK); 288ace2f57c9d0 David Howells 2024-03-18 736 if (IS_ERR(wreq)) { 288ace2f57c9d0 David Howells 2024-03-18 737 error = PTR_ERR(wreq); 288ace2f57c9d0 David Howells 2024-03-18 738 goto couldnt_start; 288ace2f57c9d0 David Howells 2024-03-18 739 } 288ace2f57c9d0 David Howells 2024-03-18 740 2e24b86f3a5edd David Howells 2026-04-09 741 if (bvecq_buffer_init(&wreq->load_cursor, GFP_NOFS) < 0) 2e24b86f3a5edd David Howells 2026-04-09 742 goto nomem; 796ea75f9f613f David Howells 2026-04-09 743 bvecq_pos_set(¶ms.dispatch_cursor, &wreq->load_cursor); 796ea75f9f613f David Howells 2026-04-09 744 bvecq_pos_set(&wreq->collect_cursor, &wreq->load_cursor); 2e24b86f3a5edd David Howells 2026-04-09 745 2b1424cd131cfa David Howells 2025-05-19 746 __set_bit(NETFS_RREQ_OFFLOAD_COLLECTION, &wreq->flags); 288ace2f57c9d0 David Howells 2024-03-18 747 trace_netfs_write(wreq, netfs_write_trace_writeback); 4824e5917f907c David Howells 2024-03-26 748 netfs_stat(&netfs_n_wh_writepages); 288ace2f57c9d0 David Howells 2024-03-18 749 796ea75f9f613f David Howells 2026-04-09 750 if (wreq->io_streams[1].avail) 796ea75f9f613f David Howells 2026-04-09 751 params.notes |= NOTE_CACHE_AVAIL; 796ea75f9f613f David Howells 2026-04-09 752 288ace2f57c9d0 David Howells 2024-03-18 753 do { 796ea75f9f613f David Howells 2026-04-09 754 _debug("wbiter %lx", folio->index); 288ace2f57c9d0 David Howells 2024-03-18 755 796ea75f9f613f David Howells 2026-04-09 756 if (!wreq->spare) { 796ea75f9f613f David Howells 2026-04-09 757 wreq->spare = bvecq_alloc_one(BVECQ_STD_SLOTS, GFP_NOFS); 796ea75f9f613f David Howells 2026-04-09 758 if (!wreq->spare) { 796ea75f9f613f David Howells 2026-04-09 759 folio_redirty_for_writepage(wbc, folio); 796ea75f9f613f David Howells 2026-04-09 760 folio_unlock(folio); 796ea75f9f613f David Howells 2026-04-09 761 error = -ENOMEM; 796ea75f9f613f David Howells 2026-04-09 762 goto end_loop; 796ea75f9f613f David Howells 2026-04-09 763 } 796ea75f9f613f David Howells 2026-04-09 764 } 288ace2f57c9d0 David Howells 2024-03-18 765 288ace2f57c9d0 David Howells 2024-03-18 766 if (netfs_folio_group(folio) != NETFS_FOLIO_COPY_TO_CACHE && 288ace2f57c9d0 David Howells 2024-03-18 767 unlikely(!test_bit(NETFS_RREQ_UPLOAD_TO_SERVER, &wreq->flags))) { 288ace2f57c9d0 David Howells 2024-03-18 768 set_bit(NETFS_RREQ_UPLOAD_TO_SERVER, &wreq->flags); 288ace2f57c9d0 David Howells 2024-03-18 769 wreq->netfs_ops->begin_writeback(wreq); 796ea75f9f613f David Howells 2026-04-09 770 if (wreq->io_streams[0].avail) { 796ea75f9f613f David Howells 2026-04-09 771 params.notes |= NOTE_UPLOAD_AVAIL; 796ea75f9f613f David Howells 2026-04-09 772 /* Order setting the active flag after other fields. */ 796ea75f9f613f David Howells 2026-04-09 773 smp_store_release(&wreq->io_streams[0].active, true); 288ace2f57c9d0 David Howells 2024-03-18 774 } b6a713fd34b949 David Howells 2026-06-25 775 } 796ea75f9f613f David Howells 2026-04-09 776 796ea75f9f613f David Howells 2026-04-09 777 params.notes &= NOTES__KEEP_MASK; 796ea75f9f613f David Howells 2026-04-09 778 netfs_queue_wb_folio(wreq, wbc, folio, ¶ms); 796ea75f9f613f David Howells 2026-04-09 779 error = netfs_issue_streams(wreq, ¶ms); 796ea75f9f613f David Howells 2026-04-09 780 if (!error) 796ea75f9f613f David Howells 2026-04-09 781 bvecq_pos_step(¶ms.dispatch_cursor); 796ea75f9f613f David Howells 2026-04-09 782 end_loop: 288ace2f57c9d0 David Howells 2024-03-18 @783 } while ((folio = writeback_iter(mapping, wbc, folio, &error))); 288ace2f57c9d0 David Howells 2024-03-18 784 796ea75f9f613f David Howells 2026-04-09 785 netfs_end_issue_write(wreq, ¶ms); 796ea75f9f613f David Howells 2026-04-09 786 2e24b86f3a5edd David Howells 2026-04-09 787 bvecq_pos_unset(&wreq->load_cursor); 796ea75f9f613f David Howells 2026-04-09 788 bvecq_pos_unset(¶ms.dispatch_cursor); 796ea75f9f613f David Howells 2026-04-09 789 for (int i = 0; i < NR_IO_STREAMS; i++) 796ea75f9f613f David Howells 2026-04-09 790 bvecq_pos_unset(&wreq->io_streams[i].dispatch_cursor); 2b1424cd131cfa David Howells 2025-05-19 791 netfs_wake_collector(wreq); 288ace2f57c9d0 David Howells 2024-03-18 792 20d72b00ca814d David Howells 2025-05-19 793 netfs_put_request(wreq, netfs_rreq_trace_put_return); a9d47a50cf257f David Howells 2024-07-18 794 _leave(" = %d", error); 288ace2f57c9d0 David Howells 2024-03-18 795 return error; 288ace2f57c9d0 David Howells 2024-03-18 796 2e24b86f3a5edd David Howells 2026-04-09 797 nomem: 2e24b86f3a5edd David Howells 2026-04-09 798 error = -ENOMEM; 2e24b86f3a5edd David Howells 2026-04-09 799 netfs_put_failed_request(wreq); 288ace2f57c9d0 David Howells 2024-03-18 800 couldnt_start: ac5f95ac5d6d0f David Howells 2026-06-25 801 if (error == -ENOMEM) { ac5f95ac5d6d0f David Howells 2026-06-25 802 folio_redirty_for_writepage(wbc, folio); ac5f95ac5d6d0f David Howells 2026-06-25 803 folio_unlock(folio); ac5f95ac5d6d0f David Howells 2026-06-25 804 folio = writeback_iter(mapping, wbc, folio, &error); ac5f95ac5d6d0f David Howells 2026-06-25 805 WARN_ON_ONCE(folio != NULL); ac5f95ac5d6d0f David Howells 2026-06-25 806 } else { 288ace2f57c9d0 David Howells 2024-03-18 807 netfs_kill_dirty_pages(mapping, wbc, folio); ac5f95ac5d6d0f David Howells 2026-06-25 808 } 288ace2f57c9d0 David Howells 2024-03-18 809 out: 41376400c4717f David Howells 2026-06-25 810 netfs_wb_end(ictx); a9d47a50cf257f David Howells 2024-07-18 811 _leave(" = %d", error); 288ace2f57c9d0 David Howells 2024-03-18 812 return error; 288ace2f57c9d0 David Howells 2024-03-18 813 } 2df86547b23dab David Howells 2024-03-08 814 EXPORT_SYMBOL(netfs_writepages); 288ace2f57c9d0 David Howells 2024-03-18 815 :::::: The code at line 783 was first introduced by commit :::::: 288ace2f57c9d06dd2e42bd80d03747d879a4068 netfs: New writeback implementation :::::: TO: David Howells <[email protected]> :::::: CC: David Howells <[email protected]> -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki