[josef-btrfs:for-4.18/block 5/13] mm/page_io.c:346:12: error: 'io_cgrp_subsys' undeclared; did you mean 'cgroup_subsys'?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git for-4.18/block
head:   657e770d4d6e3b03c3d4b96e427b30d6f766e2e2
commit: 17842d132a0e6a079842f9843739aa6abec4e9ce [5/13] swap,blkcg: issue swap io with the appropriate context
config: x86_64-randconfig-x017-201820 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
        git checkout 17842d132a0e6a079842f9843739aa6abec4e9ce
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):

   In file included from mm/page_io.c:19:0:
   include/linux/bio.h:556:55: warning: 'struct blkcg_gq' declared inside parameter list will not be visible outside of this definition or declaration
    static int bio_associate_blkg(struct bio *bio, struct blkcg_gq *blkg) { return 0; }
                                                          ^~~~~~~~
   mm/page_io.c: In function '__swap_writepage':
   mm/page_io.c:342:10: error: 'struct page' has no member named 'mem_cgroup'
     if (page->mem_cgroup) {
             ^~
   mm/page_io.c:345:36: error: 'struct page' has no member named 'mem_cgroup'
      blkcg_css = cgroup_get_e_css(page->mem_cgroup->css.cgroup,
                                       ^~
>> mm/page_io.c:346:12: error: 'io_cgrp_subsys' undeclared (first use in this function); did you mean 'cgroup_subsys'?
              &io_cgrp_subsys);
               ^~~~~~~~~~~~~~
               cgroup_subsys
   mm/page_io.c:346:12: note: each undeclared identifier is reported only once for each function it appears in
   In file included from mm/page_io.c:19:0:
   At top level:
   include/linux/bio.h:556:12: warning: 'bio_associate_blkg' defined but not used [-Wunused-function]
    static int bio_associate_blkg(struct bio *bio, struct blkcg_gq *blkg) { return 0; }
               ^~~~~~~~~~~~~~~~~~

vim +346 mm/page_io.c

   277	
   278	int __swap_writepage(struct page *page, struct writeback_control *wbc,
   279			bio_end_io_t end_write_func)
   280	{
   281		struct bio *bio;
   282		int ret;
   283		struct swap_info_struct *sis = page_swap_info(page);
   284	
   285		VM_BUG_ON_PAGE(!PageSwapCache(page), page);
   286		if (sis->flags & SWP_FILE) {
   287			struct kiocb kiocb;
   288			struct file *swap_file = sis->swap_file;
   289			struct address_space *mapping = swap_file->f_mapping;
   290			struct bio_vec bv = {
   291				.bv_page = page,
   292				.bv_len  = PAGE_SIZE,
   293				.bv_offset = 0
   294			};
   295			struct iov_iter from;
   296	
   297			iov_iter_bvec(&from, ITER_BVEC | WRITE, &bv, 1, PAGE_SIZE);
   298			init_sync_kiocb(&kiocb, swap_file);
   299			kiocb.ki_pos = page_file_offset(page);
   300	
   301			set_page_writeback(page);
   302			unlock_page(page);
   303			ret = mapping->a_ops->direct_IO(&kiocb, &from);
   304			if (ret == PAGE_SIZE) {
   305				count_vm_event(PSWPOUT);
   306				ret = 0;
   307			} else {
   308				/*
   309				 * In the case of swap-over-nfs, this can be a
   310				 * temporary failure if the system has limited
   311				 * memory for allocating transmit buffers.
   312				 * Mark the page dirty and avoid
   313				 * rotate_reclaimable_page but rate-limit the
   314				 * messages but do not flag PageError like
   315				 * the normal direct-to-bio case as it could
   316				 * be temporary.
   317				 */
   318				set_page_dirty(page);
   319				ClearPageReclaim(page);
   320				pr_err_ratelimited("Write error on dio swapfile (%llu)\n",
   321						   page_file_offset(page));
   322			}
   323			end_page_writeback(page);
   324			return ret;
   325		}
   326	
   327		ret = bdev_write_page(sis->bdev, swap_page_sector(page), page, wbc);
   328		if (!ret) {
   329			count_swpout_vm_event(page);
   330			return 0;
   331		}
   332	
   333		ret = 0;
   334		bio = get_swap_bio(GFP_NOIO, page, end_write_func);
   335		if (bio == NULL) {
   336			set_page_dirty(page);
   337			unlock_page(page);
   338			ret = -ENOMEM;
   339			goto out;
   340		}
   341		bio->bi_opf = REQ_OP_WRITE | REQ_SWAP | wbc_to_write_flags(wbc);
 > 342		if (page->mem_cgroup) {
   343			struct cgroup_subsys_state *blkcg_css;
   344	
   345			blkcg_css = cgroup_get_e_css(page->mem_cgroup->css.cgroup,
 > 346						     &io_cgrp_subsys);
   347			bio_associate_blkcg(bio, blkcg_css);
   348			css_put(blkcg_css);
   349		}
   350		count_swpout_vm_event(page);
   351		set_page_writeback(page);
   352		unlock_page(page);
   353		submit_bio(bio);
   354	out:
   355		return ret;
   356	}
   357	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux