Content-Type: multipart/mixed; boundary="===============6486371630736375688==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: Re: [PATCH v6] fuse: Add support for passthrough read/write Date: Thu, 13 Aug 2020 06:06:13 +0800 Message-ID: <202008130659.2QPJOT2a%lkp@intel.com> In-Reply-To: <20200812161452.3086303-1-balsini@android.com> List-Id: --===============6486371630736375688== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi Alessio, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on fuse/for-next] [also build test WARNING on v5.8 next-20200812] [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/Alessio-Balsini/fuse-Add-s= upport-for-passthrough-read-write/20200813-001709 base: https://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse.git f= or-next compiler: h8300-linux-gcc (GCC) 9.3.0 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot cppcheck warnings: (new ones prefixed by >>) >> fs/fuse/passthrough.c:74:7: warning: Variable 'ret' is reassigned a valu= e before the old one has been used. [redundantAssignment] ret =3D call_write_iter(passthrough_filp, iocb, iter); ^ fs/fuse/passthrough.c:63:0: note: Variable 'ret' is reassigned a value b= efore the old one has been used. ssize_t ret =3D -EIO; ^ fs/fuse/passthrough.c:74:7: note: Variable 'ret' is reassigned a value b= efore the old one has been used. ret =3D call_write_iter(passthrough_filp, iocb, iter); ^ vim +/ret +74 fs/fuse/passthrough.c 53 = 54 static inline ssize_t fuse_passthrough_read_write_iter(struct kiocb = *iocb, 55 struct iov_iter *iter, 56 bool write) 57 { 58 struct file *fuse_filp =3D iocb->ki_filp; 59 struct fuse_file *ff =3D fuse_filp->private_data; 60 struct file *passthrough_filp =3D ff->passthrough_filp; 61 struct inode *passthrough_inode; 62 struct inode *fuse_inode; 63 ssize_t ret =3D -EIO; 64 = 65 fuse_inode =3D fuse_filp->f_path.dentry->d_inode; 66 passthrough_inode =3D file_inode(passthrough_filp); 67 = 68 iocb->ki_filp =3D passthrough_filp; 69 = 70 if (write) { 71 if (!passthrough_filp->f_op->write_iter) 72 goto out; 73 = > 74 ret =3D call_write_iter(passthrough_filp, iocb, iter); 75 if (ret >=3D 0 || ret =3D=3D -EIOCBQUEUED) { 76 fsstack_copy_inode_size(fuse_inode, passthrough_inode); 77 fsstack_copy_attr_times(fuse_inode, passthrough_inode); 78 } 79 } else { 80 if (!passthrough_filp->f_op->read_iter) 81 goto out; 82 = 83 ret =3D call_read_iter(passthrough_filp, iocb, iter); 84 if (ret >=3D 0 || ret =3D=3D -EIOCBQUEUED) 85 fsstack_copy_attr_atime(fuse_inode, passthrough_inode); 86 } 87 = 88 out: 89 iocb->ki_filp =3D fuse_filp; 90 = 91 return ret; 92 } 93 = --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org --===============6486371630736375688==--