Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 31 May 2021 19:31:09 GMT
From:      Dmitry Chagin <dchagin@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 8505eb5dd8f7 - main - linux(4): Convert flags before use in utimensat.
Message-ID:  <202105311931.14VJV9VA053587@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by dchagin:

URL: https://cgit.FreeBSD.org/src/commit/?id=8505eb5dd8f743f29e9c93b6814a34f1890e6c41

commit 8505eb5dd8f743f29e9c93b6814a34f1890e6c41
Author:     Dmitry Chagin <dchagin@FreeBSD.org>
AuthorDate: 2021-05-31 19:30:37 +0000
Commit:     Dmitry Chagin <dchagin@FreeBSD.org>
CommitDate: 2021-05-31 19:30:37 +0000

    linux(4): Convert flags before use in utimensat.
    
    Differential Revision:  https://reviews.freebsd.org/D30487
    MFC after:              2 weeks
---
 sys/compat/linux/linux_misc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c
index fc846df6689f..2be328a0d6d2 100644
--- a/sys/compat/linux/linux_misc.c
+++ b/sys/compat/linux/linux_misc.c
@@ -861,6 +861,9 @@ linux_utimensat(struct thread *td, struct linux_utimensat_args *args)
 			return (0);
 	}
 
+	if (args->flags & LINUX_AT_SYMLINK_NOFOLLOW)
+		flags |= AT_SYMLINK_NOFOLLOW;
+
 	if (!LUSECONVPATH(td)) {
 		if (args->pathname != NULL) {
 			return (kern_utimensat(td, dfd, args->pathname,
@@ -873,9 +876,6 @@ linux_utimensat(struct thread *td, struct linux_utimensat_args *args)
 	else if (args->flags != 0)
 		return (EINVAL);
 
-	if (args->flags & LINUX_AT_SYMLINK_NOFOLLOW)
-		flags |= AT_SYMLINK_NOFOLLOW;
-
 	if (path == NULL)
 		error = kern_futimens(td, dfd, timesp, UIO_SYSSPACE);
 	else {



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