All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: Re: [PATCH 3/3] overlayfs: Check writeback errors w.r.t upper in ->syncfs()
Date: Sat, 19 Dec 2020 13:57:38 +0800	[thread overview]
Message-ID: <202012191348.tMsL77Jk-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 4155 bytes --]

CC: kbuild-all(a)lists.01.org
In-Reply-To: <20201216233149.39025-4-vgoyal@redhat.com>
References: <20201216233149.39025-4-vgoyal@redhat.com>
TO: Vivek Goyal <vgoyal@redhat.com>

Hi Vivek,

I love your patch! Perhaps something to improve:

[auto build test WARNING on miklos-vfs/overlayfs-next]
[also build test WARNING on vfs/for-next linux/master linus/master v5.10 next-20201218]
[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/Vivek-Goyal/vfs-overlayfs-Fix-syncfs-to-return-error/20201217-073932
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs.git overlayfs-next
:::::: branch date: 2 days ago
:::::: commit date: 2 days ago
config: x86_64-randconfig-m001-20201217 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

smatch warnings:
fs/overlayfs/super.c:327 ovl_syncfs() error: uninitialized symbol 'ret2'.

vim +/ret2 +327 fs/overlayfs/super.c

e593b2bf513dd4d Amir Goldstein 2017-01-23  291  
d0a04f1c11adc0e Vivek Goyal    2020-12-16  292  int ovl_syncfs(struct file *file)
d0a04f1c11adc0e Vivek Goyal    2020-12-16  293  {
d0a04f1c11adc0e Vivek Goyal    2020-12-16  294  	struct super_block *sb = file->f_path.dentry->d_sb;
d0a04f1c11adc0e Vivek Goyal    2020-12-16  295  	struct ovl_fs *ofs = sb->s_fs_info;
d0a04f1c11adc0e Vivek Goyal    2020-12-16  296  	struct super_block *upper_sb;
0bed6122e561e0b Vivek Goyal    2020-12-16  297  	int ret, ret2;
d0a04f1c11adc0e Vivek Goyal    2020-12-16  298  
d0a04f1c11adc0e Vivek Goyal    2020-12-16  299  	ret = 0;
d0a04f1c11adc0e Vivek Goyal    2020-12-16  300  	down_read(&sb->s_umount);
d0a04f1c11adc0e Vivek Goyal    2020-12-16  301  	if (sb_rdonly(sb))
d0a04f1c11adc0e Vivek Goyal    2020-12-16  302  		goto out;
d0a04f1c11adc0e Vivek Goyal    2020-12-16  303  
d0a04f1c11adc0e Vivek Goyal    2020-12-16  304  	if (!ovl_upper_mnt(ofs))
d0a04f1c11adc0e Vivek Goyal    2020-12-16  305  		goto out;
d0a04f1c11adc0e Vivek Goyal    2020-12-16  306  
d0a04f1c11adc0e Vivek Goyal    2020-12-16  307  	if (!ovl_should_sync(ofs))
d0a04f1c11adc0e Vivek Goyal    2020-12-16  308  		goto out;
d0a04f1c11adc0e Vivek Goyal    2020-12-16  309  
d0a04f1c11adc0e Vivek Goyal    2020-12-16  310  	upper_sb = ovl_upper_mnt(ofs)->mnt_sb;
d0a04f1c11adc0e Vivek Goyal    2020-12-16  311  
d0a04f1c11adc0e Vivek Goyal    2020-12-16  312  	down_read(&upper_sb->s_umount);
d0a04f1c11adc0e Vivek Goyal    2020-12-16  313  	ret = sync_filesystem(upper_sb);
d0a04f1c11adc0e Vivek Goyal    2020-12-16  314  	up_read(&upper_sb->s_umount);
d0a04f1c11adc0e Vivek Goyal    2020-12-16  315  
0bed6122e561e0b Vivek Goyal    2020-12-16  316  	/* Update overlay sb->s_wb_err */
0bed6122e561e0b Vivek Goyal    2020-12-16  317  	if (errseq_check(&upper_sb->s_wb_err, sb->s_wb_err)) {
0bed6122e561e0b Vivek Goyal    2020-12-16  318  		/* Upper sb has errors since last time */
0bed6122e561e0b Vivek Goyal    2020-12-16  319  		spin_lock(&ofs->errseq_lock);
0bed6122e561e0b Vivek Goyal    2020-12-16  320  		errseq_check_and_advance(&upper_sb->s_wb_err, &sb->s_wb_err);
0bed6122e561e0b Vivek Goyal    2020-12-16  321  		spin_unlock(&ofs->errseq_lock);
0bed6122e561e0b Vivek Goyal    2020-12-16  322  	}
d0a04f1c11adc0e Vivek Goyal    2020-12-16  323  
0bed6122e561e0b Vivek Goyal    2020-12-16  324  	ret2 = errseq_check_and_advance(&sb->s_wb_err, &file->f_sb_err);
d0a04f1c11adc0e Vivek Goyal    2020-12-16  325  out:
d0a04f1c11adc0e Vivek Goyal    2020-12-16  326  	up_read(&sb->s_umount);
0bed6122e561e0b Vivek Goyal    2020-12-16 @327  	return ret ? ret : ret2;
d0a04f1c11adc0e Vivek Goyal    2020-12-16  328  }
d0a04f1c11adc0e Vivek Goyal    2020-12-16  329  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 32635 bytes --]

             reply	other threads:[~2020-12-19  5:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-19  5:57 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-12-16 23:31 [RFC PATCH 0/3] vfs, overlayfs: Fix syncfs() to return error Vivek Goyal
2020-12-16 23:31 ` [PATCH 3/3] overlayfs: Check writeback errors w.r.t upper in ->syncfs() Vivek Goyal
2020-12-17 20:08   ` Jeffrey Layton
2020-12-18 14:44     ` Vivek Goyal
2020-12-18 15:02       ` Jeff Layton
2020-12-18 16:28         ` Vivek Goyal
2020-12-18 16:55           ` Jeffrey Layton
2020-12-18 20:25             ` NeilBrown
2020-12-19 13:49   ` Dan Carpenter

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=202012191348.tMsL77Jk-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild@lists.01.org \
    /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.