svn commit: r350315 - in head/sys: kern sys
Conrad Meyer
cem at freebsd.org
Thu Aug 8 02:39:12 UTC 2019
Hi Rick,
Coverity reports that the following portion of
vn_generic_copy_file_range() is deadcode (CID 1403974), and it is:
On Wed, Jul 24, 2019 at 10:46 PM Rick Macklem <rmacklem at freebsd.org> wrote:
>
> Author: rmacklem
> Date: Thu Jul 25 05:46:16 2019
> New Revision: 350315
> URL: https://svnweb.freebsd.org/changeset/base/350315
>
> Log:
> Add kernel support for a Linux compatible copy_file_range(2) syscall.
> ...
> Modified: head/sys/kern/vfs_vnops.c
> ==============================================================================
> --- head/sys/kern/vfs_vnops.c Thu Jul 25 03:55:05 2019 (r350314)
> +++ head/sys/kern/vfs_vnops.c Thu Jul 25 05:46:16 2019 (r350315)
> ...
> +int
> +vn_generic_copy_file_range(struct vnode *invp, off_t *inoffp,
> + struct vnode *outvp, off_t *outoffp, size_t *lenp, unsigned int flags,
> + struct ucred *incred, struct ucred *outcred, struct thread *fsize_td)
> +{
> ...
> + error = vn_lock(invp, LK_SHARED);
> + if (error != 0)
> + goto out;
// error is now zero
> + if (VOP_PATHCONF(invp, _PC_MIN_HOLE_SIZE, &holein) != 0)
> + holein = 0;
> + VOP_UNLOCK(invp, 0);
// the following condition is impossible:
> + if (error != 0)
> + goto out;
Best,
Conrad
More information about the svn-src-head
mailing list