From owner-svn-src-stable@FreeBSD.ORG Thu Feb 21 05:38:12 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 531FC9F8; Thu, 21 Feb 2013 05:38:12 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 45189105B; Thu, 21 Feb 2013 05:38:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1L5cCwG087915; Thu, 21 Feb 2013 05:38:12 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1L5cBrn087913; Thu, 21 Feb 2013 05:38:11 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201302210538.r1L5cBrn087913@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 21 Feb 2013 05:38:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r247076 - in stable/9/sys: fs/devfs kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Feb 2013 05:38:12 -0000 Author: kib Date: Thu Feb 21 05:38:11 2013 New Revision: 247076 URL: http://svnweb.freebsd.org/changeset/base/247076 Log: MFC r246472: Stop translating the ERESTART error from the open(2) into EINTR. Posix requires that open(2) is restartable for SA_RESTART. Modified: stable/9/sys/fs/devfs/devfs_vnops.c stable/9/sys/kern/vfs_syscalls.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/fs/ (props changed) Modified: stable/9/sys/fs/devfs/devfs_vnops.c ============================================================================== --- stable/9/sys/fs/devfs/devfs_vnops.c Thu Feb 21 05:08:21 2013 (r247075) +++ stable/9/sys/fs/devfs/devfs_vnops.c Thu Feb 21 05:38:11 2013 (r247076) @@ -1089,8 +1089,11 @@ devfs_open(struct vop_open_args *ap) vn_lock(vp, vlocked | LK_RETRY); dev_relthread(dev, ref); - if (error) + if (error != 0) { + if (error == ERESTART) + error = EINTR; return (error); + } #if 0 /* /dev/console */ KASSERT(fp != NULL, ("Could not vnode bypass device on NULL fp")); Modified: stable/9/sys/kern/vfs_syscalls.c ============================================================================== --- stable/9/sys/kern/vfs_syscalls.c Thu Feb 21 05:08:21 2013 (r247075) +++ stable/9/sys/kern/vfs_syscalls.c Thu Feb 21 05:38:11 2013 (r247076) @@ -1167,8 +1167,6 @@ kern_openat(struct thread *td, int fd, c fdclose(fdp, fp, indx, td); fdrop(fp, td); - if (error == ERESTART) - error = EINTR; return (error); } td->td_dupfd = 0;