From owner-svn-src-head@freebsd.org Tue Aug 21 18:50:30 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6A632107C4FD; Tue, 21 Aug 2018 18:50:30 +0000 (UTC) (envelope-from fsu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 208C692162; Tue, 21 Aug 2018 18:50:30 +0000 (UTC) (envelope-from fsu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0197D27DFC; Tue, 21 Aug 2018 18:50:30 +0000 (UTC) (envelope-from fsu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7LIoTxq098509; Tue, 21 Aug 2018 18:50:29 GMT (envelope-from fsu@FreeBSD.org) Received: (from fsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7LIoTWA098508; Tue, 21 Aug 2018 18:50:29 GMT (envelope-from fsu@FreeBSD.org) Message-Id: <201808211850.w7LIoTWA098508@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: fsu set sender to fsu@FreeBSD.org using -f From: Fedor Uporov Date: Tue, 21 Aug 2018 18:50:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338153 - head/sys/fs/fuse X-SVN-Group: head X-SVN-Commit-Author: fsu X-SVN-Commit-Paths: head/sys/fs/fuse X-SVN-Commit-Revision: 338153 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Aug 2018 18:50:30 -0000 Author: fsu Date: Tue Aug 21 18:50:29 2018 New Revision: 338153 URL: https://svnweb.freebsd.org/changeset/base/338153 Log: FUSE extattrs: fix issue when neither uio nor size were not passed to VOP_* (cosmetic only). Reviewed by: cem, pfg MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D13737 Modified: head/sys/fs/fuse/fuse_vnops.c Modified: head/sys/fs/fuse/fuse_vnops.c ============================================================================== --- head/sys/fs/fuse/fuse_vnops.c Tue Aug 21 18:39:47 2018 (r338152) +++ head/sys/fs/fuse/fuse_vnops.c Tue Aug 21 18:50:29 2018 (r338153) @@ -2012,21 +2012,21 @@ fuse_vnop_getextattr(struct vop_getextattr_args *ap) { struct vnode *vp = ap->a_vp; struct uio *uio = ap->a_uio; - struct fuse_dispatcher fdi = {0}; + struct fuse_dispatcher fdi; struct fuse_getxattr_in *get_xattr_in; struct fuse_getxattr_out *get_xattr_out; struct mount *mp = vnode_mount(vp); - char *prefix; - size_t len; - char *attr_str; struct thread *td = ap->a_td; struct ucred *cred = ap->a_cred; - int err = 0; + char *prefix; + char *attr_str; + size_t len; + int err; fuse_trace_printf_vnop(); if (fuse_isdeadfs(vp)) - return ENXIO; + return (ENXIO); /* Default to looking for user attributes. */ if (ap->a_attrnamespace == EXTATTR_NAMESPACE_SYSTEM) @@ -2057,7 +2057,6 @@ fuse_vnop_getextattr(struct vop_getextattr_args *ap) ap->a_name); err = fdisp_wait_answ(&fdi); - if (err != 0) { if (err == ENOSYS) fsess_set_notimpl(mp, FUSE_GETXATTR); @@ -2094,20 +2093,20 @@ fuse_vnop_setextattr(struct vop_setextattr_args *ap) { struct vnode *vp = ap->a_vp; struct uio *uio = ap->a_uio; - struct fuse_dispatcher fdi = {0}; + struct fuse_dispatcher fdi; struct fuse_setxattr_in *set_xattr_in; struct mount *mp = vnode_mount(vp); + struct thread *td = ap->a_td; + struct ucred *cred = ap->a_cred; char *prefix; size_t len; char *attr_str; - struct thread *td = ap->a_td; - struct ucred *cred = ap->a_cred; - int err = 0; - + int err; + fuse_trace_printf_vnop(); if (fuse_isdeadfs(vp)) - return ENXIO; + return (ENXIO); /* Default to looking for user attributes. */ if (ap->a_attrnamespace == EXTATTR_NAMESPACE_SYSTEM) @@ -2220,10 +2219,12 @@ fuse_vnop_listextattr(struct vop_listextattr_args *ap) { struct vnode *vp = ap->a_vp; struct uio *uio = ap->a_uio; - struct fuse_dispatcher fdi = {0}; + struct fuse_dispatcher fdi; struct fuse_listxattr_in *list_xattr_in; struct fuse_listxattr_out *list_xattr_out; struct mount *mp = vnode_mount(vp); + struct thread *td = ap->a_td; + struct ucred *cred = ap->a_cred; size_t len; char *prefix; char *attr_str; @@ -2231,14 +2232,12 @@ fuse_vnop_listextattr(struct vop_listextattr_args *ap) char *linux_list; int bsd_list_len; int linux_list_len; - struct thread *td = ap->a_td; - struct ucred *cred = ap->a_cred; - int err = 0; + int err; fuse_trace_printf_vnop(); if (fuse_isdeadfs(vp)) - return ENXIO; + return (ENXIO); /* * Add space for a NUL and the period separator if enabled. @@ -2332,19 +2331,19 @@ static int fuse_vnop_deleteextattr(struct vop_deleteextattr_args *ap) { struct vnode *vp = ap->a_vp; - struct fuse_dispatcher fdi = {0}; + struct fuse_dispatcher fdi; struct mount *mp = vnode_mount(vp); + struct thread *td = ap->a_td; + struct ucred *cred = ap->a_cred; char *prefix; size_t len; char *attr_str; - struct thread *td = ap->a_td; - struct ucred *cred = ap->a_cred; int err; fuse_trace_printf_vnop(); if (fuse_isdeadfs(vp)) - return ENXIO; + return (ENXIO); /* Default to looking for user attributes. */ if (ap->a_attrnamespace == EXTATTR_NAMESPACE_SYSTEM)