Hi John,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v4.18-rc3]
[cannot apply to next-20180629]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:    
https://github.com/0day-ci/linux/commits/john-hubbard-gmail-com/mm-fs-gup-don-t-unmap-or-drop-filesystem-buffers/20180702-090125
config: i386-randconfig-x075-201826 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

   fs/f2fs/dir.c: In function 'f2fs_delete_entry':
>> fs/f2fs/dir.c:734:33: error: 'WB_SYNC_ALL' undeclared (first use in this 
>> function); did you mean 'FS_SYNC_FL'?
      clear_page_dirty_for_io(page, WB_SYNC_ALL);
                                    ^~~~~~~~~~~
                                    FS_SYNC_FL
   fs/f2fs/dir.c:734:33: note: each undeclared identifier is reported only once 
for each function it appears in
--
   fs/f2fs/inline.c: In function 'f2fs_convert_inline_page':
>> fs/f2fs/inline.c:139:50: error: dereferencing pointer to incomplete type 
>> 'struct writeback_control'
     dirty = clear_page_dirty_for_io(page, fio.io_wbc->sync_mode);
                                                     ^~
--
   In file included from include/linux/kernel.h:10:0,
                    from include/linux/list.h:9,
                    from include/linux/wait.h:7,
                    from include/linux/wait_bit.h:8,
                    from include/linux/fs.h:6,
                    from fs/f2fs/checkpoint.c:11:
   fs/f2fs/checkpoint.c: In function 'commit_checkpoint':
>> fs/f2fs/checkpoint.c:1200:49: error: invalid type argument of '->' (have 
>> 'struct writeback_control')
     if (unlikely(!clear_page_dirty_for_io(page, wbc->sync_mode)))
                                                    ^
   include/linux/compiler.h:77:42: note: in definition of macro 'unlikely'
    # define unlikely(x) __builtin_expect(!!(x), 0)
                                             ^
--
   fs/f2fs/data.c: In function 'f2fs_write_cache_pages':
>> fs/f2fs/data.c:2021:9: error: too few arguments to function 
>> 'clear_page_dirty_for_io'
       if (!clear_page_dirty_for_io(page), wbc->sync_mode)
            ^~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/pagemap.h:8:0,
                    from include/linux/f2fs_fs.h:14,
                    from fs/f2fs/data.c:12:
   include/linux/mm.h:1540:5: note: declared here
    int clear_page_dirty_for_io(struct page *page, int sync_mode);
        ^~~~~~~~~~~~~~~~~~~~~~~
   fs/f2fs/data.c:2021:38: warning: left-hand operand of comma expression has 
no effect [-Wunused-value]
       if (!clear_page_dirty_for_io(page), wbc->sync_mode)
                                         ^

vim +734 fs/f2fs/dir.c

   690  
   691  /*
   692   * It only removes the dentry from the dentry page, corresponding name
   693   * entry in name page does not need to be touched during deletion.
   694   */
   695  void f2fs_delete_entry(struct f2fs_dir_entry *dentry, struct page *page,
   696                                          struct inode *dir, struct inode 
*inode)
   697  {
   698          struct  f2fs_dentry_block *dentry_blk;
   699          unsigned int bit_pos;
   700          int slots = GET_DENTRY_SLOTS(le16_to_cpu(dentry->name_len));
   701          int i;
   702  
   703          f2fs_update_time(F2FS_I_SB(dir), REQ_TIME);
   704  
   705          if (F2FS_OPTION(F2FS_I_SB(dir)).fsync_mode == FSYNC_MODE_STRICT)
   706                  f2fs_add_ino_entry(F2FS_I_SB(dir), dir->i_ino, 
TRANS_DIR_INO);
   707  
   708          if (f2fs_has_inline_dentry(dir))
   709                  return f2fs_delete_inline_entry(dentry, page, dir, 
inode);
   710  
   711          lock_page(page);
   712          f2fs_wait_on_page_writeback(page, DATA, true);
   713  
   714          dentry_blk = page_address(page);
   715          bit_pos = dentry - dentry_blk->dentry;
   716          for (i = 0; i < slots; i++)
   717                  __clear_bit_le(bit_pos + i, &dentry_blk->dentry_bitmap);
   718  
   719          /* Let's check and deallocate this dentry page */
   720          bit_pos = find_next_bit_le(&dentry_blk->dentry_bitmap,
   721                          NR_DENTRY_IN_BLOCK,
   722                          0);
   723          set_page_dirty(page);
   724  
   725          dir->i_ctime = dir->i_mtime = current_time(dir);
   726          f2fs_mark_inode_dirty_sync(dir, false);
   727  
   728          if (inode)
   729                  f2fs_drop_nlink(dir, inode);
   730  
   731          if (bit_pos == NR_DENTRY_IN_BLOCK &&
   732                  !f2fs_truncate_hole(dir, page->index, page->index + 1)) 
{
   733                  f2fs_clear_radix_tree_dirty_tag(page);
 > 734                  clear_page_dirty_for_io(page, WB_SYNC_ALL);
   735                  ClearPagePrivate(page);
   736                  ClearPageUptodate(page);
   737                  inode_dec_dirty_pages(dir);
   738                  f2fs_remove_dirty_inode(dir);
   739          }
   740          f2fs_put_page(page, 1);
   741  }
   742  

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

Attachment: .config.gz
Description: application/gzip

Reply via email to