* [chao:dev-test 6/6] fs/f2fs/super.c:2916:26: warning: variable 'inode' is uninitialized when used here
@ 2023-05-03 19:06 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-05-03 19:06 UTC (permalink / raw)
To: Chao Yu, Chao Yu; +Cc: llvm, oe-kbuild-all, Chao Yu, Chao Yu
tree: https://git.kernel.org/pub/scm/linux/kernel/git/chao/linux.git dev-test
head: fd78b242ba1bbc77bdfb3d58a3cec054d3f18ed1
commit: fd78b242ba1bbc77bdfb3d58a3cec054d3f18ed1 [6/6] f2fs: fix potential deadlock due to unpaired node_write lock invoking
config: i386-randconfig-a013-20230501 (https://download.01.org/0day-ci/archive/20230504/202305040319.EAx2MRsG-lkp@intel.com/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
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/chao/linux.git/commit/?id=fd78b242ba1bbc77bdfb3d58a3cec054d3f18ed1
git remote add chao https://git.kernel.org/pub/scm/linux/kernel/git/chao/linux.git
git fetch --no-tags chao dev-test
git checkout fd78b242ba1bbc77bdfb3d58a3cec054d3f18ed1
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash fs/f2fs/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202305040319.EAx2MRsG-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> fs/f2fs/super.c:2916:26: warning: variable 'inode' is uninitialized when used here [-Wuninitialized]
f2fs_down_write(&F2FS_I(inode)->i_gc_rwsem[WRITE]);
^~~~~
fs/f2fs/super.c:2903:21: note: initialize the variable 'inode' to silence this warning
struct inode *inode;
^
= NULL
1 warning generated.
vim +/inode +2916 fs/f2fs/super.c
2899
2900 static int f2fs_quota_on(struct super_block *sb, int type, int format_id,
2901 const struct path *path)
2902 {
2903 struct inode *inode;
2904 int err;
2905
2906 /* if quota sysfile exists, deny enabling quota with specific file */
2907 if (f2fs_sb_has_quota_ino(F2FS_SB(sb))) {
2908 f2fs_err(F2FS_SB(sb), "quota sysfile already exists");
2909 return -EBUSY;
2910 }
2911
2912 err = f2fs_quota_sync(sb, type);
2913 if (err)
2914 return err;
2915
> 2916 f2fs_down_write(&F2FS_I(inode)->i_gc_rwsem[WRITE]);
2917 filemap_invalidate_lock(inode->i_mapping);
2918
2919 truncate_pagecache(inode, i_size_read(inode));
2920
2921 if (get_dirty_pages(inode))
2922 err = -EAGAIN;
2923 else
2924 err = dquot_quota_on(sb, type, format_id, path);
2925
2926 filemap_invalidate_unlock(inode->i_mapping);
2927 f2fs_up_write(&F2FS_I(inode)->i_gc_rwsem[WRITE]);
2928 if (err)
2929 return err;
2930
2931 inode = d_inode(path->dentry);
2932
2933 inode_lock(inode);
2934 F2FS_I(inode)->i_flags |= F2FS_NOATIME_FL | F2FS_IMMUTABLE_FL;
2935 f2fs_set_inode_flags(inode);
2936 inode_unlock(inode);
2937 f2fs_mark_inode_dirty_sync(inode, false);
2938 return 0;
2939 }
2940
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-05-03 19:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-03 19:06 [chao:dev-test 6/6] fs/f2fs/super.c:2916:26: warning: variable 'inode' is uninitialized when used here kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).