From owner-svn-src-all@freebsd.org Sat Oct 3 22:29:39 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8B2D7A0F2BC; Sat, 3 Oct 2015 22:29:39 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-wi0-x232.google.com (mail-wi0-x232.google.com [IPv6:2a00:1450:400c:c05::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 36471182F; Sat, 3 Oct 2015 22:29:39 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by wicgb1 with SMTP id gb1so74054853wic.1; Sat, 03 Oct 2015 15:29:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=u817LOpDzghxfp3kWsA8KPHmqtASVrs9DslxpOzdbF0=; b=Dtx81XOXuzdy0wPAwWvLrp6JNaHmEUIHeh7RiMlhfqg4ikbN+rAbtfcP5/abpS6H6N oyUBaOtgFa3Jwfa3fsZpJOqSHsmeUoh4bcJaNpV5bAgjQUnecX9+xJtedh95KpBdCsud nEC2UwmEKiOdQcxmCqN5QYU8xHv5kgp6f3pvbGjdKHZ6ZEbR3j+99Xga/CY2F+fG2GFP rSGgTVL5cyOQyAbok7XBhR6FAkep7MhQ4CLDRDEfSuoQd9qMl805AaGfjgg8R27FeP7e +a2xKNhnpOdNTYCr2rJaJvNdvjev00/sKJM8f36dllRYszF653vdWod9aIFi6yPIKlW2 9RBg== MIME-Version: 1.0 X-Received: by 10.194.71.39 with SMTP id r7mr25858512wju.120.1443911376587; Sat, 03 Oct 2015 15:29:36 -0700 (PDT) Sender: markjdb@gmail.com Received: by 10.194.151.137 with HTTP; Sat, 3 Oct 2015 15:29:36 -0700 (PDT) In-Reply-To: <20151003213311.GB57303@stack.nl> References: <201510031937.t93Jbgkk077518@repo.freebsd.org> <20151003213311.GB57303@stack.nl> Date: Sat, 3 Oct 2015 15:29:36 -0700 X-Google-Sender-Auth: UTJQQheHZ5TTeVJEp_cW0MklZaE Message-ID: Subject: Re: svn commit: r288628 - head/sys/kern From: Mark Johnston To: Jilles Tjoelker Cc: src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Oct 2015 22:29:39 -0000 On Sat, Oct 3, 2015 at 2:33 PM, Jilles Tjoelker wrote: > On Sat, Oct 03, 2015 at 07:37:42PM +0000, Mark Johnston wrote: >> Author: markj >> Date: Sat Oct 3 19:37:41 2015 >> New Revision: 288628 >> URL: https://svnweb.freebsd.org/changeset/base/288628 > >> Log: >> The return value of posix_fadvise(2) is just an error status, so >> sys_posix_fadvise() should simply return the errno (or 0) to syscallenter() >> rather than setting a return value. > >> MFC after: 1 week > >> Modified: >> head/sys/kern/vfs_syscalls.c >> >> Modified: head/sys/kern/vfs_syscalls.c >> ============================================================================== >> --- head/sys/kern/vfs_syscalls.c Sat Oct 3 19:27:52 2015 (r288627) >> +++ head/sys/kern/vfs_syscalls.c Sat Oct 3 19:37:41 2015 (r288628) >> @@ -4663,7 +4663,6 @@ int >> sys_posix_fadvise(struct thread *td, struct posix_fadvise_args *uap) >> { >> >> - td->td_retval[0] = kern_posix_fadvise(td, uap->fd, uap->offset, >> - uap->len, uap->advice); >> - return (0); >> + return (kern_posix_fadvise(td, uap->fd, uap->offset, uap->len, >> + uap->advice)); >> } > > This change makes the code match the man page, but in fact, the code was > right and the man page is wrong. Per POSIX, posix_fadvise() shall return > 0 on success and an error number on failure, and need not modify errno. Oops, thank you. This is fixed in r288640; I updated the posix_fadvise man page to use the same wording as for posix_fallocate. > > Also, this kind of ABI change in general is almost always a bad idea > when the function is already part of a stable branch. Noted, thanks.