CC: [email protected]
BCC: [email protected]
CC: [email protected]
TO: "Matthew Wilcox (Oracle)" <[email protected]>

tree:   git://git.infradead.org/users/willy/pagecache for-next
head:   223ab4ed54499645015108bfbb3055e0f8c64613
commit: c5abb86e384b80b5b320c73668066e67142c706e [174/179] nilfs: Convert 
nilfs_set_page_dirty() to nilfs_dirty_folio()
:::::: branch date: 26 hours ago
:::::: commit date: 26 hours ago
config: x86_64-randconfig-m001-20220314 
(https://download.01.org/0day-ci/archive/20220316/[email protected]/config)
compiler: gcc-9 (Ubuntu 9.4.0-1ubuntu1~20.04) 9.4.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>
Reported-by: Dan Carpenter <[email protected]>

New smatch warnings:
fs/nilfs2/inode.c:232 nilfs_dirty_folio() error: uninitialized symbol 
'nr_dirty'.

Old smatch warnings:
fs/nilfs2/inode.c:1084 nilfs_fiemap() warn: should 'n << blkbits' be a 64 bit 
type?
fs/nilfs2/inode.c:1097 nilfs_fiemap() warn: should 'n << blkbits' be a 64 bit 
type?
fs/nilfs2/inode.c:1104 nilfs_fiemap() warn: should 'n << blkbits' be a 64 bit 
type?

vim +/nr_dirty +232 fs/nilfs2/inode.c

05fe58fdc10df9e Ryusuke Konishi         2009-04-06  201  
c5abb86e384b80b Matthew Wilcox (Oracle  2022-02-09  202) static bool 
nilfs_dirty_folio(struct address_space *mapping,
c5abb86e384b80b Matthew Wilcox (Oracle  2022-02-09  203)                struct 
folio *folio)
05fe58fdc10df9e Ryusuke Konishi         2009-04-06  204  {
c5abb86e384b80b Matthew Wilcox (Oracle  2022-02-09  205)        struct inode 
*inode = mapping->host;
c5abb86e384b80b Matthew Wilcox (Oracle  2022-02-09  206)        struct 
buffer_head *head;
c5abb86e384b80b Matthew Wilcox (Oracle  2022-02-09  207)        unsigned int 
nr_dirty;
c5abb86e384b80b Matthew Wilcox (Oracle  2022-02-09  208)        bool ret = 
filemap_dirty_folio(mapping, folio);
05fe58fdc10df9e Ryusuke Konishi         2009-04-06  209  
136e8770cd5d1fe Ryusuke Konishi         2013-05-24  210         /*
c5abb86e384b80b Matthew Wilcox (Oracle  2022-02-09  211)         * The page may 
not be locked, eg if called from try_to_unmap_one()
136e8770cd5d1fe Ryusuke Konishi         2013-05-24  212          */
c5abb86e384b80b Matthew Wilcox (Oracle  2022-02-09  213)        
spin_lock(&mapping->private_lock);
c5abb86e384b80b Matthew Wilcox (Oracle  2022-02-09  214)        head = 
folio_buffers(folio);
c5abb86e384b80b Matthew Wilcox (Oracle  2022-02-09  215)        if (head) {
c5abb86e384b80b Matthew Wilcox (Oracle  2022-02-09  216)                struct 
buffer_head *bh = head;
c5abb86e384b80b Matthew Wilcox (Oracle  2022-02-09  217) 
c5abb86e384b80b Matthew Wilcox (Oracle  2022-02-09  218)                
nr_dirty = 0;
136e8770cd5d1fe Ryusuke Konishi         2013-05-24  219                 do {
136e8770cd5d1fe Ryusuke Konishi         2013-05-24  220                         
/* Do not mark hole blocks dirty */
136e8770cd5d1fe Ryusuke Konishi         2013-05-24  221                         
if (buffer_dirty(bh) || !buffer_mapped(bh))
136e8770cd5d1fe Ryusuke Konishi         2013-05-24  222                         
        continue;
136e8770cd5d1fe Ryusuke Konishi         2013-05-24  223  
136e8770cd5d1fe Ryusuke Konishi         2013-05-24  224                         
set_buffer_dirty(bh);
136e8770cd5d1fe Ryusuke Konishi         2013-05-24  225                         
nr_dirty++;
136e8770cd5d1fe Ryusuke Konishi         2013-05-24  226                 } while 
(bh = bh->b_this_page, bh != head);
56d7acc792c0d98 Andreas Rohner          2014-09-25  227         } else if (ret) 
{
c5abb86e384b80b Matthew Wilcox (Oracle  2022-02-09  228)                
nr_dirty = 1 << (PAGE_SHIFT - inode->i_blkbits);
c5abb86e384b80b Matthew Wilcox (Oracle  2022-02-09  229)        }
c5abb86e384b80b Matthew Wilcox (Oracle  2022-02-09  230)        
spin_unlock(&mapping->private_lock);
56d7acc792c0d98 Andreas Rohner          2014-09-25  231  
c5abb86e384b80b Matthew Wilcox (Oracle  2022-02-09 @232)        if (nr_dirty)
bcbc8c648d6cc88 Ryusuke Konishi         2010-12-27  233                 
nilfs_set_file_dirty(inode, nr_dirty);
05fe58fdc10df9e Ryusuke Konishi         2009-04-06  234         return ret;
05fe58fdc10df9e Ryusuke Konishi         2009-04-06  235  }
05fe58fdc10df9e Ryusuke Konishi         2009-04-06  236  

---
0-DAY CI Kernel Test Service
https://lists.01.org/hyperkitty/list/[email protected]
_______________________________________________
kbuild mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to