Re: [PATCH v7 1/2] Add do_ftruncate that truncates a struct file

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

 



Hi Tony,

kernel test robot noticed the following build warnings:

[auto build test WARNING on d3fa86b1a7b4cdc4367acacea16b72e0a200b3d7]

url:    https://github.com/intel-lab-lkp/linux/commits/Tony-Solomonik/Add-do_ftruncate-that-truncates-a-struct-file/20240126-235914
base:   d3fa86b1a7b4cdc4367acacea16b72e0a200b3d7
patch link:    https://lore.kernel.org/r/20240126155720.20385-2-tony.solomonik%40gmail.com
patch subject: [PATCH v7 1/2] Add do_ftruncate that truncates a struct file
config: i386-randconfig-141-20240129 (https://download.01.org/0day-ci/archive/20240129/202401290716.JZDZbcf3-lkp@xxxxxxxxx/config)
compiler: gcc-11 (Debian 11.3.0-12) 11.3.0

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 <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202401290716.JZDZbcf3-lkp@xxxxxxxxx/

smatch warnings:
fs/open.c:178 do_ftruncate() warn: inconsistent indenting

vim +178 fs/open.c

   156	
   157	long do_ftruncate(struct file *file, loff_t length)
   158	{
   159		struct inode *inode;
   160		struct dentry *dentry;
   161		int error;
   162	
   163		dentry = file->f_path.dentry;
   164		inode = dentry->d_inode;
   165		if (!S_ISREG(inode->i_mode) || !(file->f_mode & FMODE_WRITE))
   166			return -EINVAL;
   167	
   168		/* Check IS_APPEND on real upper inode */
   169		if (IS_APPEND(file_inode(file)))
   170			return -EPERM;
   171		sb_start_write(inode->i_sb);
   172		error = security_file_truncate(file);
   173		if (!error)
   174			error = do_truncate(file_mnt_idmap(file), dentry, length,
   175					    ATTR_MTIME | ATTR_CTIME, file);
   176		sb_end_write(inode->i_sb);
   177	
 > 178	  return error;
   179	}
   180	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux