Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 Apr 2016 06:36:58 +0000 (UTC)
From:      Dmitry Chagin <dchagin@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r297780 - stable/10/sys/compat/linux
Message-ID:  <201604100636.u3A6awa8084755@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dchagin
Date: Sun Apr 10 06:36:58 2016
New Revision: 297780
URL: https://svnweb.freebsd.org/changeset/base/297780

Log:
  MFCR r297519, r297525 (by pfg@):
  
  Move Linux specific times tests up to guarantee the values are defined.

Modified:
  stable/10/sys/compat/linux/linux_misc.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/compat/linux/linux_misc.c
==============================================================================
--- stable/10/sys/compat/linux/linux_misc.c	Sun Apr 10 06:19:26 2016	(r297779)
+++ stable/10/sys/compat/linux/linux_misc.c	Sun Apr 10 06:36:58 2016	(r297780)
@@ -894,13 +894,14 @@ linux_utimensat(struct thread *td, struc
 			break;
 		}
 		timesp = times;
-	}
 
-	if (times[0].tv_nsec == UTIME_OMIT && times[1].tv_nsec == UTIME_OMIT)
 		/* This breaks POSIX, but is what the Linux kernel does
 		 * _on purpose_ (documented in the man page for utimensat(2)),
 		 * so we must follow that behaviour. */
-		return (0);
+		if (times[0].tv_nsec == UTIME_OMIT &&
+		    times[1].tv_nsec == UTIME_OMIT)
+			return (0);
+	}
 
 	if (args->pathname != NULL)
 		LCONVPATHEXIST_AT(td, args->pathname, &path, dfd);



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