Date: Thu, 21 Feb 2013 06:10:37 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r247083 - in stable/8/sys: fs/devfs kern Message-ID: <201302210610.r1L6AbKs098109@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Thu Feb 21 06:10:36 2013 New Revision: 247083 URL: http://svnweb.freebsd.org/changeset/base/247083 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/8/sys/fs/devfs/devfs_vnops.c stable/8/sys/kern/vfs_syscalls.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/fs/ (props changed) stable/8/sys/kern/ (props changed) Modified: stable/8/sys/fs/devfs/devfs_vnops.c ============================================================================== --- stable/8/sys/fs/devfs/devfs_vnops.c Thu Feb 21 06:00:33 2013 (r247082) +++ stable/8/sys/fs/devfs/devfs_vnops.c Thu Feb 21 06:10:36 2013 (r247083) @@ -1015,8 +1015,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/8/sys/kern/vfs_syscalls.c ============================================================================== --- stable/8/sys/kern/vfs_syscalls.c Thu Feb 21 06:00:33 2013 (r247082) +++ stable/8/sys/kern/vfs_syscalls.c Thu Feb 21 06:10:36 2013 (r247083) @@ -1107,8 +1107,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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201302210610.r1L6AbKs098109>