All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-stable-rc:linux-4.14.y 5002/5021] fs/ext4/ioctl.c:523:7: error: incompatible pointer to integer conversion assigning to 'int' from 'struct super_block *'
@ 2023-07-21 20:20 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-07-21 20:20 UTC (permalink / raw)
  To: Chao Yu, Chao Yu
  Cc: llvm, oe-kbuild-all, Greg Kroah-Hartman, Theodore Ts'o

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.14.y
head:   5cffa7b2aa8b04d9314eff634a714e0c6fc2b754
commit: c5db0ab1cf73c0d6b3a55de6a6077f6e314dbf6b [5002/5021] ext4: fix to check return value of freeze_bdev() in ext4_shutdown()
config: mips-cavium_octeon_defconfig (https://download.01.org/0day-ci/archive/20230722/202307220458.koLmwkSE-lkp@intel.com/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project.git 4a5ac14ee968ff0ad5d2cc1ffa0299048db4c88a)
reproduce: (https://download.01.org/0day-ci/archive/20230722/202307220458.koLmwkSE-lkp@intel.com/reproduce)

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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202307220458.koLmwkSE-lkp@intel.com/

All errors (new ones prefixed by >>):

>> fs/ext4/ioctl.c:523:7: error: incompatible pointer to integer conversion assigning to 'int' from 'struct super_block *' [-Wint-conversion]
     523 |                 ret = freeze_bdev(sb->s_bdev);
         |                     ^ ~~~~~~~~~~~~~~~~~~~~~~~
   1 error generated.


vim +523 fs/ext4/ioctl.c

   500	
   501	static int ext4_shutdown(struct super_block *sb, unsigned long arg)
   502	{
   503		struct ext4_sb_info *sbi = EXT4_SB(sb);
   504		__u32 flags;
   505		int ret;
   506	
   507		if (!capable(CAP_SYS_ADMIN))
   508			return -EPERM;
   509	
   510		if (get_user(flags, (__u32 __user *)arg))
   511			return -EFAULT;
   512	
   513		if (flags > EXT4_GOING_FLAGS_NOLOGFLUSH)
   514			return -EINVAL;
   515	
   516		if (ext4_forced_shutdown(sbi))
   517			return 0;
   518	
   519		ext4_msg(sb, KERN_ALERT, "shut down requested (%d)", flags);
   520	
   521		switch (flags) {
   522		case EXT4_GOING_FLAGS_DEFAULT:
 > 523			ret = freeze_bdev(sb->s_bdev);
   524			if (ret)
   525				return ret;
   526			set_bit(EXT4_FLAGS_SHUTDOWN, &sbi->s_ext4_flags);
   527			thaw_bdev(sb->s_bdev, sb);
   528			break;
   529		case EXT4_GOING_FLAGS_LOGFLUSH:
   530			set_bit(EXT4_FLAGS_SHUTDOWN, &sbi->s_ext4_flags);
   531			if (sbi->s_journal && !is_journal_aborted(sbi->s_journal)) {
   532				(void) ext4_force_commit(sb);
   533				jbd2_journal_abort(sbi->s_journal, -ESHUTDOWN);
   534			}
   535			break;
   536		case EXT4_GOING_FLAGS_NOLOGFLUSH:
   537			set_bit(EXT4_FLAGS_SHUTDOWN, &sbi->s_ext4_flags);
   538			if (sbi->s_journal && !is_journal_aborted(sbi->s_journal))
   539				jbd2_journal_abort(sbi->s_journal, -ESHUTDOWN);
   540			break;
   541		default:
   542			return -EINVAL;
   543		}
   544		clear_opt(sb, DISCARD);
   545		return 0;
   546	}
   547	

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-07-21 20:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-21 20:20 [linux-stable-rc:linux-4.14.y 5002/5021] fs/ext4/ioctl.c:523:7: error: incompatible pointer to integer conversion assigning to 'int' from 'struct super_block *' 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.