From: kernel test robot <lkp@intel.com>
To: Chao Yu <yuchao0@huawei.com>, Chao Yu <chao@kernel.org>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Theodore Ts'o <tytso@mit.edu>
Subject: [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 *'
Date: Sat, 22 Jul 2023 04:20:40 +0800 [thread overview]
Message-ID: <202307220458.koLmwkSE-lkp@intel.com> (raw)
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
reply other threads:[~2023-07-21 20:21 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202307220458.koLmwkSE-lkp@intel.com \
--to=lkp@intel.com \
--cc=chao@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=tytso@mit.edu \
--cc=yuchao0@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.