From owner-svn-src-all@FreeBSD.ORG Wed Jun 13 21:15:02 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 19E861065672; Wed, 13 Jun 2012 21:15:02 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 015688FC1B; Wed, 13 Jun 2012 21:15:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q5DLF1gu049339; Wed, 13 Jun 2012 21:15:01 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5DLF1bP049336; Wed, 13 Jun 2012 21:15:01 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201206132115.q5DLF1bP049336@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Wed, 13 Jun 2012 21:15:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237031 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 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: Wed, 13 Jun 2012 21:15:02 -0000 Author: pjd Date: Wed Jun 13 21:15:01 2012 New Revision: 237031 URL: http://svn.freebsd.org/changeset/base/237031 Log: Remove duplicated code. MFC after: 1 month Modified: head/sys/kern/vfs_syscalls.c Modified: head/sys/kern/vfs_syscalls.c ============================================================================== --- head/sys/kern/vfs_syscalls.c Wed Jun 13 21:13:18 2012 (r237030) +++ head/sys/kern/vfs_syscalls.c Wed Jun 13 21:15:01 2012 (r237031) @@ -1161,17 +1161,9 @@ kern_openat(struct thread *td, int fd, c flags, error_open)) == 0) goto success; } - /* - * Clean up the descriptor, but only if another thread hadn't - * replaced or closed it. - */ - if (indx != -1) - fdclose(fdp, fp, indx, td); - fdrop(fp, td); - if (error == ERESTART) error = EINTR; - return (error); + goto bad_unlocked; } td->td_dupfd = 0; vfslocked = NDHASGIANT(&nd);