All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-next:master 9016/9522] fs/ntfs3/inode.c:1792:2: warning: unannotated fall-through between switch labels
@ 2021-08-21 22:56 ` kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-08-21 22:56 UTC (permalink / raw)
  To: Konstantin Komarov
  Cc: clang-built-linux, kbuild-all, Linux Memory Management List

[-- Attachment #1: Type: text/plain, Size: 10893 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   86ed57fd8c93fdfaabb4f58e78455180fa7d8a84
commit: b4a4ba2f7c4dd1ea56cadd48fb231f8fd0816e75 [9016/9522] Merge remote-tracking branch 'ntfs3/master'
config: x86_64-randconfig-r011-20210822 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 9e9d70591e72fc6762b4b9a226b68ed1307419bf)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=b4a4ba2f7c4dd1ea56cadd48fb231f8fd0816e75
        git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
        git fetch --no-tags linux-next master
        git checkout b4a4ba2f7c4dd1ea56cadd48fb231f8fd0816e75
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> fs/ntfs3/inode.c:1792:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
           case -ENOTEMPTY:
           ^
   fs/ntfs3/inode.c:1792:2: note: insert 'break;' to avoid fall-through
           case -ENOTEMPTY:
           ^
           break; 
   1 warning generated.
--
>> fs/ntfs3/index.c:178:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
           default:
           ^
   fs/ntfs3/index.c:178:2: note: insert 'break;' to avoid fall-through
           default:
           ^
           break; 
   1 warning generated.


vim +1792 fs/ntfs3/inode.c

82cae269cfa953 Konstantin Komarov 2021-08-13  1694  
82cae269cfa953 Konstantin Komarov 2021-08-13  1695  /*
82cae269cfa953 Konstantin Komarov 2021-08-13  1696   * ntfs_unlink_inode
82cae269cfa953 Konstantin Komarov 2021-08-13  1697   *
82cae269cfa953 Konstantin Komarov 2021-08-13  1698   * inode_operations::unlink
82cae269cfa953 Konstantin Komarov 2021-08-13  1699   * inode_operations::rmdir
82cae269cfa953 Konstantin Komarov 2021-08-13  1700   */
82cae269cfa953 Konstantin Komarov 2021-08-13  1701  int ntfs_unlink_inode(struct inode *dir, const struct dentry *dentry)
82cae269cfa953 Konstantin Komarov 2021-08-13  1702  {
82cae269cfa953 Konstantin Komarov 2021-08-13  1703  	int err;
82cae269cfa953 Konstantin Komarov 2021-08-13  1704  	struct super_block *sb = dir->i_sb;
82cae269cfa953 Konstantin Komarov 2021-08-13  1705  	struct ntfs_sb_info *sbi = sb->s_fs_info;
82cae269cfa953 Konstantin Komarov 2021-08-13  1706  	struct inode *inode = d_inode(dentry);
82cae269cfa953 Konstantin Komarov 2021-08-13  1707  	struct ntfs_inode *ni = ntfs_i(inode);
82cae269cfa953 Konstantin Komarov 2021-08-13  1708  	const struct qstr *name = &dentry->d_name;
82cae269cfa953 Konstantin Komarov 2021-08-13  1709  	struct ntfs_inode *dir_ni = ntfs_i(dir);
82cae269cfa953 Konstantin Komarov 2021-08-13  1710  	struct ntfs_index *indx = &dir_ni->dir;
82cae269cfa953 Konstantin Komarov 2021-08-13  1711  	struct cpu_str *uni = NULL;
82cae269cfa953 Konstantin Komarov 2021-08-13  1712  	struct ATTR_FILE_NAME *fname;
82cae269cfa953 Konstantin Komarov 2021-08-13  1713  	u8 name_type;
82cae269cfa953 Konstantin Komarov 2021-08-13  1714  	struct ATTR_LIST_ENTRY *le;
82cae269cfa953 Konstantin Komarov 2021-08-13  1715  	struct MFT_REF ref;
82cae269cfa953 Konstantin Komarov 2021-08-13  1716  	bool is_dir = S_ISDIR(inode->i_mode);
82cae269cfa953 Konstantin Komarov 2021-08-13  1717  	struct INDEX_ROOT *dir_root;
82cae269cfa953 Konstantin Komarov 2021-08-13  1718  
82cae269cfa953 Konstantin Komarov 2021-08-13  1719  	dir_root = indx_get_root(indx, dir_ni, NULL, NULL);
82cae269cfa953 Konstantin Komarov 2021-08-13  1720  	if (!dir_root)
82cae269cfa953 Konstantin Komarov 2021-08-13  1721  		return -EINVAL;
82cae269cfa953 Konstantin Komarov 2021-08-13  1722  
82cae269cfa953 Konstantin Komarov 2021-08-13  1723  	ni_lock(ni);
82cae269cfa953 Konstantin Komarov 2021-08-13  1724  
82cae269cfa953 Konstantin Komarov 2021-08-13  1725  	if (is_dir && !dir_is_empty(inode)) {
82cae269cfa953 Konstantin Komarov 2021-08-13  1726  		err = -ENOTEMPTY;
82cae269cfa953 Konstantin Komarov 2021-08-13  1727  		goto out1;
82cae269cfa953 Konstantin Komarov 2021-08-13  1728  	}
82cae269cfa953 Konstantin Komarov 2021-08-13  1729  
82cae269cfa953 Konstantin Komarov 2021-08-13  1730  	if (ntfs_is_meta_file(sbi, inode->i_ino)) {
82cae269cfa953 Konstantin Komarov 2021-08-13  1731  		err = -EINVAL;
82cae269cfa953 Konstantin Komarov 2021-08-13  1732  		goto out1;
82cae269cfa953 Konstantin Komarov 2021-08-13  1733  	}
82cae269cfa953 Konstantin Komarov 2021-08-13  1734  
82cae269cfa953 Konstantin Komarov 2021-08-13  1735  	/* allocate PATH_MAX bytes */
82cae269cfa953 Konstantin Komarov 2021-08-13  1736  	uni = __getname();
82cae269cfa953 Konstantin Komarov 2021-08-13  1737  	if (!uni) {
82cae269cfa953 Konstantin Komarov 2021-08-13  1738  		err = -ENOMEM;
82cae269cfa953 Konstantin Komarov 2021-08-13  1739  		goto out1;
82cae269cfa953 Konstantin Komarov 2021-08-13  1740  	}
82cae269cfa953 Konstantin Komarov 2021-08-13  1741  
82cae269cfa953 Konstantin Komarov 2021-08-13  1742  	/* Convert input string to unicode */
82cae269cfa953 Konstantin Komarov 2021-08-13  1743  	err = ntfs_nls_to_utf16(sbi, name->name, name->len, uni, NTFS_NAME_LEN,
82cae269cfa953 Konstantin Komarov 2021-08-13  1744  				UTF16_HOST_ENDIAN);
82cae269cfa953 Konstantin Komarov 2021-08-13  1745  	if (err < 0)
82cae269cfa953 Konstantin Komarov 2021-08-13  1746  		goto out2;
82cae269cfa953 Konstantin Komarov 2021-08-13  1747  
82cae269cfa953 Konstantin Komarov 2021-08-13  1748  	/*mark rw ntfs as dirty. it will be cleared at umount*/
82cae269cfa953 Konstantin Komarov 2021-08-13  1749  	ntfs_set_state(sbi, NTFS_DIRTY_DIRTY);
82cae269cfa953 Konstantin Komarov 2021-08-13  1750  
82cae269cfa953 Konstantin Komarov 2021-08-13  1751  	/* find name in record */
82cae269cfa953 Konstantin Komarov 2021-08-13  1752  	mi_get_ref(&dir_ni->mi, &ref);
82cae269cfa953 Konstantin Komarov 2021-08-13  1753  
82cae269cfa953 Konstantin Komarov 2021-08-13  1754  	le = NULL;
82cae269cfa953 Konstantin Komarov 2021-08-13  1755  	fname = ni_fname_name(ni, uni, &ref, &le);
82cae269cfa953 Konstantin Komarov 2021-08-13  1756  	if (!fname) {
82cae269cfa953 Konstantin Komarov 2021-08-13  1757  		err = -ENOENT;
82cae269cfa953 Konstantin Komarov 2021-08-13  1758  		goto out3;
82cae269cfa953 Konstantin Komarov 2021-08-13  1759  	}
82cae269cfa953 Konstantin Komarov 2021-08-13  1760  
82cae269cfa953 Konstantin Komarov 2021-08-13  1761  	name_type = paired_name(fname->type);
82cae269cfa953 Konstantin Komarov 2021-08-13  1762  
82cae269cfa953 Konstantin Komarov 2021-08-13  1763  	err = indx_delete_entry(indx, dir_ni, fname, fname_full_size(fname),
82cae269cfa953 Konstantin Komarov 2021-08-13  1764  				sbi);
82cae269cfa953 Konstantin Komarov 2021-08-13  1765  	if (err)
82cae269cfa953 Konstantin Komarov 2021-08-13  1766  		goto out3;
82cae269cfa953 Konstantin Komarov 2021-08-13  1767  
82cae269cfa953 Konstantin Komarov 2021-08-13  1768  	/* Then remove name from mft */
82cae269cfa953 Konstantin Komarov 2021-08-13  1769  	ni_remove_attr_le(ni, attr_from_name(fname), le);
82cae269cfa953 Konstantin Komarov 2021-08-13  1770  
82cae269cfa953 Konstantin Komarov 2021-08-13  1771  	le16_add_cpu(&ni->mi.mrec->hard_links, -1);
82cae269cfa953 Konstantin Komarov 2021-08-13  1772  	ni->mi.dirty = true;
82cae269cfa953 Konstantin Komarov 2021-08-13  1773  
82cae269cfa953 Konstantin Komarov 2021-08-13  1774  	if (name_type != FILE_NAME_POSIX) {
82cae269cfa953 Konstantin Komarov 2021-08-13  1775  		/* Now we should delete name by type */
82cae269cfa953 Konstantin Komarov 2021-08-13  1776  		fname = ni_fname_type(ni, name_type, &le);
82cae269cfa953 Konstantin Komarov 2021-08-13  1777  		if (fname) {
82cae269cfa953 Konstantin Komarov 2021-08-13  1778  			err = indx_delete_entry(indx, dir_ni, fname,
82cae269cfa953 Konstantin Komarov 2021-08-13  1779  						fname_full_size(fname), sbi);
82cae269cfa953 Konstantin Komarov 2021-08-13  1780  			if (err)
82cae269cfa953 Konstantin Komarov 2021-08-13  1781  				goto out3;
82cae269cfa953 Konstantin Komarov 2021-08-13  1782  
82cae269cfa953 Konstantin Komarov 2021-08-13  1783  			ni_remove_attr_le(ni, attr_from_name(fname), le);
82cae269cfa953 Konstantin Komarov 2021-08-13  1784  
82cae269cfa953 Konstantin Komarov 2021-08-13  1785  			le16_add_cpu(&ni->mi.mrec->hard_links, -1);
82cae269cfa953 Konstantin Komarov 2021-08-13  1786  		}
82cae269cfa953 Konstantin Komarov 2021-08-13  1787  	}
82cae269cfa953 Konstantin Komarov 2021-08-13  1788  out3:
82cae269cfa953 Konstantin Komarov 2021-08-13  1789  	switch (err) {
82cae269cfa953 Konstantin Komarov 2021-08-13  1790  	case 0:
82cae269cfa953 Konstantin Komarov 2021-08-13  1791  		drop_nlink(inode);
82cae269cfa953 Konstantin Komarov 2021-08-13 @1792  	case -ENOTEMPTY:
82cae269cfa953 Konstantin Komarov 2021-08-13  1793  	case -ENOSPC:
82cae269cfa953 Konstantin Komarov 2021-08-13  1794  	case -EROFS:
82cae269cfa953 Konstantin Komarov 2021-08-13  1795  		break;
82cae269cfa953 Konstantin Komarov 2021-08-13  1796  	default:
82cae269cfa953 Konstantin Komarov 2021-08-13  1797  		make_bad_inode(inode);
82cae269cfa953 Konstantin Komarov 2021-08-13  1798  	}
82cae269cfa953 Konstantin Komarov 2021-08-13  1799  
82cae269cfa953 Konstantin Komarov 2021-08-13  1800  	dir->i_mtime = dir->i_ctime = current_time(dir);
82cae269cfa953 Konstantin Komarov 2021-08-13  1801  	mark_inode_dirty(dir);
82cae269cfa953 Konstantin Komarov 2021-08-13  1802  	inode->i_ctime = dir->i_ctime;
82cae269cfa953 Konstantin Komarov 2021-08-13  1803  	if (inode->i_nlink)
82cae269cfa953 Konstantin Komarov 2021-08-13  1804  		mark_inode_dirty(inode);
82cae269cfa953 Konstantin Komarov 2021-08-13  1805  
82cae269cfa953 Konstantin Komarov 2021-08-13  1806  out2:
82cae269cfa953 Konstantin Komarov 2021-08-13  1807  	__putname(uni);
82cae269cfa953 Konstantin Komarov 2021-08-13  1808  out1:
82cae269cfa953 Konstantin Komarov 2021-08-13  1809  	ni_unlock(ni);
82cae269cfa953 Konstantin Komarov 2021-08-13  1810  	return err;
82cae269cfa953 Konstantin Komarov 2021-08-13  1811  }
82cae269cfa953 Konstantin Komarov 2021-08-13  1812  

:::::: The code at line 1792 was first introduced by commit
:::::: 82cae269cfa953032fbb8980a7d554d60fb00b17 fs/ntfs3: Add initialization of super block

:::::: TO: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
:::::: CC: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 35257 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [linux-next:master 9016/9522] fs/ntfs3/inode.c:1792:2: warning: unannotated fall-through between switch labels
@ 2021-08-21 22:56 ` kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-08-21 22:56 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 11062 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   86ed57fd8c93fdfaabb4f58e78455180fa7d8a84
commit: b4a4ba2f7c4dd1ea56cadd48fb231f8fd0816e75 [9016/9522] Merge remote-tracking branch 'ntfs3/master'
config: x86_64-randconfig-r011-20210822 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 9e9d70591e72fc6762b4b9a226b68ed1307419bf)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=b4a4ba2f7c4dd1ea56cadd48fb231f8fd0816e75
        git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
        git fetch --no-tags linux-next master
        git checkout b4a4ba2f7c4dd1ea56cadd48fb231f8fd0816e75
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> fs/ntfs3/inode.c:1792:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
           case -ENOTEMPTY:
           ^
   fs/ntfs3/inode.c:1792:2: note: insert 'break;' to avoid fall-through
           case -ENOTEMPTY:
           ^
           break; 
   1 warning generated.
--
>> fs/ntfs3/index.c:178:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
           default:
           ^
   fs/ntfs3/index.c:178:2: note: insert 'break;' to avoid fall-through
           default:
           ^
           break; 
   1 warning generated.


vim +1792 fs/ntfs3/inode.c

82cae269cfa953 Konstantin Komarov 2021-08-13  1694  
82cae269cfa953 Konstantin Komarov 2021-08-13  1695  /*
82cae269cfa953 Konstantin Komarov 2021-08-13  1696   * ntfs_unlink_inode
82cae269cfa953 Konstantin Komarov 2021-08-13  1697   *
82cae269cfa953 Konstantin Komarov 2021-08-13  1698   * inode_operations::unlink
82cae269cfa953 Konstantin Komarov 2021-08-13  1699   * inode_operations::rmdir
82cae269cfa953 Konstantin Komarov 2021-08-13  1700   */
82cae269cfa953 Konstantin Komarov 2021-08-13  1701  int ntfs_unlink_inode(struct inode *dir, const struct dentry *dentry)
82cae269cfa953 Konstantin Komarov 2021-08-13  1702  {
82cae269cfa953 Konstantin Komarov 2021-08-13  1703  	int err;
82cae269cfa953 Konstantin Komarov 2021-08-13  1704  	struct super_block *sb = dir->i_sb;
82cae269cfa953 Konstantin Komarov 2021-08-13  1705  	struct ntfs_sb_info *sbi = sb->s_fs_info;
82cae269cfa953 Konstantin Komarov 2021-08-13  1706  	struct inode *inode = d_inode(dentry);
82cae269cfa953 Konstantin Komarov 2021-08-13  1707  	struct ntfs_inode *ni = ntfs_i(inode);
82cae269cfa953 Konstantin Komarov 2021-08-13  1708  	const struct qstr *name = &dentry->d_name;
82cae269cfa953 Konstantin Komarov 2021-08-13  1709  	struct ntfs_inode *dir_ni = ntfs_i(dir);
82cae269cfa953 Konstantin Komarov 2021-08-13  1710  	struct ntfs_index *indx = &dir_ni->dir;
82cae269cfa953 Konstantin Komarov 2021-08-13  1711  	struct cpu_str *uni = NULL;
82cae269cfa953 Konstantin Komarov 2021-08-13  1712  	struct ATTR_FILE_NAME *fname;
82cae269cfa953 Konstantin Komarov 2021-08-13  1713  	u8 name_type;
82cae269cfa953 Konstantin Komarov 2021-08-13  1714  	struct ATTR_LIST_ENTRY *le;
82cae269cfa953 Konstantin Komarov 2021-08-13  1715  	struct MFT_REF ref;
82cae269cfa953 Konstantin Komarov 2021-08-13  1716  	bool is_dir = S_ISDIR(inode->i_mode);
82cae269cfa953 Konstantin Komarov 2021-08-13  1717  	struct INDEX_ROOT *dir_root;
82cae269cfa953 Konstantin Komarov 2021-08-13  1718  
82cae269cfa953 Konstantin Komarov 2021-08-13  1719  	dir_root = indx_get_root(indx, dir_ni, NULL, NULL);
82cae269cfa953 Konstantin Komarov 2021-08-13  1720  	if (!dir_root)
82cae269cfa953 Konstantin Komarov 2021-08-13  1721  		return -EINVAL;
82cae269cfa953 Konstantin Komarov 2021-08-13  1722  
82cae269cfa953 Konstantin Komarov 2021-08-13  1723  	ni_lock(ni);
82cae269cfa953 Konstantin Komarov 2021-08-13  1724  
82cae269cfa953 Konstantin Komarov 2021-08-13  1725  	if (is_dir && !dir_is_empty(inode)) {
82cae269cfa953 Konstantin Komarov 2021-08-13  1726  		err = -ENOTEMPTY;
82cae269cfa953 Konstantin Komarov 2021-08-13  1727  		goto out1;
82cae269cfa953 Konstantin Komarov 2021-08-13  1728  	}
82cae269cfa953 Konstantin Komarov 2021-08-13  1729  
82cae269cfa953 Konstantin Komarov 2021-08-13  1730  	if (ntfs_is_meta_file(sbi, inode->i_ino)) {
82cae269cfa953 Konstantin Komarov 2021-08-13  1731  		err = -EINVAL;
82cae269cfa953 Konstantin Komarov 2021-08-13  1732  		goto out1;
82cae269cfa953 Konstantin Komarov 2021-08-13  1733  	}
82cae269cfa953 Konstantin Komarov 2021-08-13  1734  
82cae269cfa953 Konstantin Komarov 2021-08-13  1735  	/* allocate PATH_MAX bytes */
82cae269cfa953 Konstantin Komarov 2021-08-13  1736  	uni = __getname();
82cae269cfa953 Konstantin Komarov 2021-08-13  1737  	if (!uni) {
82cae269cfa953 Konstantin Komarov 2021-08-13  1738  		err = -ENOMEM;
82cae269cfa953 Konstantin Komarov 2021-08-13  1739  		goto out1;
82cae269cfa953 Konstantin Komarov 2021-08-13  1740  	}
82cae269cfa953 Konstantin Komarov 2021-08-13  1741  
82cae269cfa953 Konstantin Komarov 2021-08-13  1742  	/* Convert input string to unicode */
82cae269cfa953 Konstantin Komarov 2021-08-13  1743  	err = ntfs_nls_to_utf16(sbi, name->name, name->len, uni, NTFS_NAME_LEN,
82cae269cfa953 Konstantin Komarov 2021-08-13  1744  				UTF16_HOST_ENDIAN);
82cae269cfa953 Konstantin Komarov 2021-08-13  1745  	if (err < 0)
82cae269cfa953 Konstantin Komarov 2021-08-13  1746  		goto out2;
82cae269cfa953 Konstantin Komarov 2021-08-13  1747  
82cae269cfa953 Konstantin Komarov 2021-08-13  1748  	/*mark rw ntfs as dirty. it will be cleared@umount*/
82cae269cfa953 Konstantin Komarov 2021-08-13  1749  	ntfs_set_state(sbi, NTFS_DIRTY_DIRTY);
82cae269cfa953 Konstantin Komarov 2021-08-13  1750  
82cae269cfa953 Konstantin Komarov 2021-08-13  1751  	/* find name in record */
82cae269cfa953 Konstantin Komarov 2021-08-13  1752  	mi_get_ref(&dir_ni->mi, &ref);
82cae269cfa953 Konstantin Komarov 2021-08-13  1753  
82cae269cfa953 Konstantin Komarov 2021-08-13  1754  	le = NULL;
82cae269cfa953 Konstantin Komarov 2021-08-13  1755  	fname = ni_fname_name(ni, uni, &ref, &le);
82cae269cfa953 Konstantin Komarov 2021-08-13  1756  	if (!fname) {
82cae269cfa953 Konstantin Komarov 2021-08-13  1757  		err = -ENOENT;
82cae269cfa953 Konstantin Komarov 2021-08-13  1758  		goto out3;
82cae269cfa953 Konstantin Komarov 2021-08-13  1759  	}
82cae269cfa953 Konstantin Komarov 2021-08-13  1760  
82cae269cfa953 Konstantin Komarov 2021-08-13  1761  	name_type = paired_name(fname->type);
82cae269cfa953 Konstantin Komarov 2021-08-13  1762  
82cae269cfa953 Konstantin Komarov 2021-08-13  1763  	err = indx_delete_entry(indx, dir_ni, fname, fname_full_size(fname),
82cae269cfa953 Konstantin Komarov 2021-08-13  1764  				sbi);
82cae269cfa953 Konstantin Komarov 2021-08-13  1765  	if (err)
82cae269cfa953 Konstantin Komarov 2021-08-13  1766  		goto out3;
82cae269cfa953 Konstantin Komarov 2021-08-13  1767  
82cae269cfa953 Konstantin Komarov 2021-08-13  1768  	/* Then remove name from mft */
82cae269cfa953 Konstantin Komarov 2021-08-13  1769  	ni_remove_attr_le(ni, attr_from_name(fname), le);
82cae269cfa953 Konstantin Komarov 2021-08-13  1770  
82cae269cfa953 Konstantin Komarov 2021-08-13  1771  	le16_add_cpu(&ni->mi.mrec->hard_links, -1);
82cae269cfa953 Konstantin Komarov 2021-08-13  1772  	ni->mi.dirty = true;
82cae269cfa953 Konstantin Komarov 2021-08-13  1773  
82cae269cfa953 Konstantin Komarov 2021-08-13  1774  	if (name_type != FILE_NAME_POSIX) {
82cae269cfa953 Konstantin Komarov 2021-08-13  1775  		/* Now we should delete name by type */
82cae269cfa953 Konstantin Komarov 2021-08-13  1776  		fname = ni_fname_type(ni, name_type, &le);
82cae269cfa953 Konstantin Komarov 2021-08-13  1777  		if (fname) {
82cae269cfa953 Konstantin Komarov 2021-08-13  1778  			err = indx_delete_entry(indx, dir_ni, fname,
82cae269cfa953 Konstantin Komarov 2021-08-13  1779  						fname_full_size(fname), sbi);
82cae269cfa953 Konstantin Komarov 2021-08-13  1780  			if (err)
82cae269cfa953 Konstantin Komarov 2021-08-13  1781  				goto out3;
82cae269cfa953 Konstantin Komarov 2021-08-13  1782  
82cae269cfa953 Konstantin Komarov 2021-08-13  1783  			ni_remove_attr_le(ni, attr_from_name(fname), le);
82cae269cfa953 Konstantin Komarov 2021-08-13  1784  
82cae269cfa953 Konstantin Komarov 2021-08-13  1785  			le16_add_cpu(&ni->mi.mrec->hard_links, -1);
82cae269cfa953 Konstantin Komarov 2021-08-13  1786  		}
82cae269cfa953 Konstantin Komarov 2021-08-13  1787  	}
82cae269cfa953 Konstantin Komarov 2021-08-13  1788  out3:
82cae269cfa953 Konstantin Komarov 2021-08-13  1789  	switch (err) {
82cae269cfa953 Konstantin Komarov 2021-08-13  1790  	case 0:
82cae269cfa953 Konstantin Komarov 2021-08-13  1791  		drop_nlink(inode);
82cae269cfa953 Konstantin Komarov 2021-08-13 @1792  	case -ENOTEMPTY:
82cae269cfa953 Konstantin Komarov 2021-08-13  1793  	case -ENOSPC:
82cae269cfa953 Konstantin Komarov 2021-08-13  1794  	case -EROFS:
82cae269cfa953 Konstantin Komarov 2021-08-13  1795  		break;
82cae269cfa953 Konstantin Komarov 2021-08-13  1796  	default:
82cae269cfa953 Konstantin Komarov 2021-08-13  1797  		make_bad_inode(inode);
82cae269cfa953 Konstantin Komarov 2021-08-13  1798  	}
82cae269cfa953 Konstantin Komarov 2021-08-13  1799  
82cae269cfa953 Konstantin Komarov 2021-08-13  1800  	dir->i_mtime = dir->i_ctime = current_time(dir);
82cae269cfa953 Konstantin Komarov 2021-08-13  1801  	mark_inode_dirty(dir);
82cae269cfa953 Konstantin Komarov 2021-08-13  1802  	inode->i_ctime = dir->i_ctime;
82cae269cfa953 Konstantin Komarov 2021-08-13  1803  	if (inode->i_nlink)
82cae269cfa953 Konstantin Komarov 2021-08-13  1804  		mark_inode_dirty(inode);
82cae269cfa953 Konstantin Komarov 2021-08-13  1805  
82cae269cfa953 Konstantin Komarov 2021-08-13  1806  out2:
82cae269cfa953 Konstantin Komarov 2021-08-13  1807  	__putname(uni);
82cae269cfa953 Konstantin Komarov 2021-08-13  1808  out1:
82cae269cfa953 Konstantin Komarov 2021-08-13  1809  	ni_unlock(ni);
82cae269cfa953 Konstantin Komarov 2021-08-13  1810  	return err;
82cae269cfa953 Konstantin Komarov 2021-08-13  1811  }
82cae269cfa953 Konstantin Komarov 2021-08-13  1812  

:::::: The code at line 1792 was first introduced by commit
:::::: 82cae269cfa953032fbb8980a7d554d60fb00b17 fs/ntfs3: Add initialization of super block

:::::: TO: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
:::::: CC: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 35257 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-08-21 22:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-21 22:56 [linux-next:master 9016/9522] fs/ntfs3/inode.c:1792:2: warning: unannotated fall-through between switch labels kernel test robot
2021-08-21 22:56 ` kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.