[PATCH 05/11] ubifs: Rename whiteout atomically

kernel test robot lkp at intel.com
Thu Oct 28 22:33:57 PDT 2021


Hi Zhihao,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linux/master]
[also build test ERROR on linus/master rw-ubifs/next v5.15-rc7 next-20211028]
[cannot apply to rw-ubifs/fixes]
[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]

url:    https://github.com/0day-ci/linux/commits/Zhihao-Cheng/Some-bugfixs-for-ubifs-ubi/20211025-113114
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 2f111a6fd5b5297b4e92f53798ca086f7c7d33a4
config: x86_64-buildonly-randconfig-r004-20211028 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        # https://github.com/0day-ci/linux/commit/8a6ca5bc1be93cca9c7b0167a71bdd338f854600
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Zhihao-Cheng/Some-bugfixs-for-ubifs-ubi/20211025-113114
        git checkout 8a6ca5bc1be93cca9c7b0167a71bdd338f854600
        # save the attached .config to linux build tree
        make W=1 ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp at intel.com>

All errors (new ones prefixed by >>):

   fs/ubifs/dir.c: In function 'create_whiteout':
>> fs/ubifs/dir.c:357:22: error: variable 'ui' set but not used [-Werror=unused-but-set-variable]
     357 |  struct ubifs_inode *ui;
         |                      ^~
   cc1: all warnings being treated as errors


vim +/ui +357 fs/ubifs/dir.c

   351	
   352	static struct inode *create_whiteout(struct inode *dir, struct dentry *dentry,
   353					     umode_t mode)
   354	{
   355		int err;
   356		struct inode *inode;
 > 357		struct ubifs_inode *ui;
   358		struct ubifs_info *c = dir->i_sb->s_fs_info;
   359		struct fscrypt_name nm;
   360	
   361		/*
   362		 * Create an inode('nlink = 1') for whiteout without updating journal,
   363		 * let ubifs_jnl_rename() store it on flash to complete rename whiteout
   364		 * atomically.
   365		 */
   366	
   367		dbg_gen("dent '%pd', mode %#hx in dir ino %lu",
   368			dentry, mode, dir->i_ino);
   369	
   370		err = fscrypt_setup_filename(dir, &dentry->d_name, 0, &nm);
   371		if (err)
   372			return ERR_PTR(err);
   373	
   374		inode = ubifs_new_inode(c, dir, mode);
   375		if (IS_ERR(inode)) {
   376			err = PTR_ERR(inode);
   377			goto out_free;
   378		}
   379		ui = ubifs_inode(inode);
   380	
   381		init_special_inode(inode, inode->i_mode, WHITEOUT_DEV);
   382		ubifs_assert(c, inode->i_op == &ubifs_file_inode_operations);
   383	
   384		err = ubifs_init_security(dir, inode, &dentry->d_name);
   385		if (err)
   386			goto out_inode;
   387	
   388		/* The dir size is updated by do_rename. */
   389		insert_inode_hash(inode);
   390	
   391		return inode;
   392	
   393	out_inode:
   394		make_bad_inode(inode);
   395		iput(inode);
   396	out_free:
   397		fscrypt_free_filename(&nm);
   398		ubifs_err(c, "cannot create whiteout file, error %d", err);
   399		return ERR_PTR(err);
   400	}
   401	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 35706 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-mtd/attachments/20211029/f121457a/attachment-0001.gz>


More information about the linux-mtd mailing list