Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Jun 2012 21:15:01 +0000 (UTC)
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r237031 - head/sys/kern
Message-ID:  <201206132115.q5DLF1bP049336@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201206132115.q5DLF1bP049336>