Re: [PATCH v2] Fix issue in mark_buffer_dirty_inode

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

 



Hi Hyeonwoo,

kernel test robot noticed the following build errors:

[auto build test ERROR on brauner-vfs/vfs.all]
[also build test ERROR on linus/master v6.10-rc2 next-20240604]
[cannot apply to jack-fs/for_next tytso-ext4/dev vfs-idmapping/for-next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Hyeonwoo-Cha/Fix-issue-in-mark_buffer_dirty_inode/20240604-140958
base:   https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git vfs.all
patch link:    https://lore.kernel.org/r/20240604060636.87652-1-chw1119%40hanyang.ac.kr
patch subject: [PATCH v2] Fix issue in mark_buffer_dirty_inode
config: alpha-allyesconfig (https://download.01.org/0day-ci/archive/20240604/202406041616.S1kIWWZc-lkp@xxxxxxxxx/config)
compiler: alpha-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240604/202406041616.S1kIWWZc-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202406041616.S1kIWWZc-lkp@xxxxxxxxx/

All error/warnings (new ones prefixed by >>):

   fs/affs/namei.c: In function 'affs_symlink':
>> fs/affs/namei.c:377:9: error: expected ',' or ';' before 'mark_buffer_dirty_fsync'
     377 |         mark_buffer_dirty_fsync(bh, mapping);
         |         ^~~~~~~~~~~~~~~~~~~~~~~
>> fs/affs/namei.c:376:31: warning: unused variable 'mapping' [-Wunused-variable]
     376 |         struct address_space *mapping = inode->i_mapping
         |                               ^~~~~~~


vim +377 fs/affs/namei.c

   314	
   315	int
   316	affs_symlink(struct mnt_idmap *idmap, struct inode *dir,
   317		     struct dentry *dentry, const char *symname)
   318	{
   319		struct super_block	*sb = dir->i_sb;
   320		struct buffer_head	*bh;
   321		struct inode		*inode;
   322		char			*p;
   323		int			 i, maxlen, error;
   324		char			 c, lc;
   325	
   326		pr_debug("%s(%lu,\"%pd\" -> \"%s\")\n",
   327			 __func__, dir->i_ino, dentry, symname);
   328	
   329		maxlen = AFFS_SB(sb)->s_hashsize * sizeof(u32) - 1;
   330		inode  = affs_new_inode(dir);
   331		if (!inode)
   332			return -ENOSPC;
   333	
   334		inode->i_op = &affs_symlink_inode_operations;
   335		inode_nohighmem(inode);
   336		inode->i_data.a_ops = &affs_symlink_aops;
   337		inode->i_mode = S_IFLNK | 0777;
   338		affs_mode_to_prot(inode);
   339	
   340		error = -EIO;
   341		bh = affs_bread(sb, inode->i_ino);
   342		if (!bh)
   343			goto err;
   344		i  = 0;
   345		p  = (char *)AFFS_HEAD(bh)->table;
   346		lc = '/';
   347		if (*symname == '/') {
   348			struct affs_sb_info *sbi = AFFS_SB(sb);
   349			while (*symname == '/')
   350				symname++;
   351			spin_lock(&sbi->symlink_lock);
   352			while (sbi->s_volume[i])	/* Cannot overflow */
   353				*p++ = sbi->s_volume[i++];
   354			spin_unlock(&sbi->symlink_lock);
   355		}
   356		while (i < maxlen && (c = *symname++)) {
   357			if (c == '.' && lc == '/' && *symname == '.' && symname[1] == '/') {
   358				*p++ = '/';
   359				i++;
   360				symname += 2;
   361				lc = '/';
   362			} else if (c == '.' && lc == '/' && *symname == '/') {
   363				symname++;
   364				lc = '/';
   365			} else {
   366				*p++ = c;
   367				lc   = c;
   368				i++;
   369			}
   370			if (lc == '/')
   371				while (*symname == '/')
   372					symname++;
   373		}
   374		*p = 0;
   375		inode->i_size = i + 1;
 > 376		struct address_space *mapping = inode->i_mapping
 > 377		mark_buffer_dirty_fsync(bh, mapping);
   378		affs_brelse(bh);
   379		mark_inode_dirty(inode);
   380	
   381		error = affs_add_entry(dir, inode, dentry, ST_SOFTLINK);
   382		if (error)
   383			goto err;
   384	
   385		return 0;
   386	
   387	err:
   388		clear_nlink(inode);
   389		mark_inode_dirty(inode);
   390		iput(inode);
   391		return error;
   392	}
   393	

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




[Index of Archives]     [Linux File System Development]     [Linux BTRFS]     [Linux NFS]     [Linux Filesystems]     [Ext4 Filesystem]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Resources]

  Powered by Linux