OSDN Git Service

Merge branch 'uaccess.csum' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
[tomoyo/tomoyo-test1.git] / fs / utimes.c
index 1d17ce9..b7b9275 100644 (file)
@@ -95,13 +95,13 @@ long do_utimes(int dfd, const char __user *filename, struct timespec64 *times,
                goto out;
        }
 
-       if (flags & ~AT_SYMLINK_NOFOLLOW)
+       if (flags & ~(AT_SYMLINK_NOFOLLOW | AT_EMPTY_PATH))
                goto out;
 
        if (filename == NULL && dfd != AT_FDCWD) {
                struct fd f;
 
-               if (flags & AT_SYMLINK_NOFOLLOW)
+               if (flags)
                        goto out;
 
                f = fdget(dfd);
@@ -117,6 +117,8 @@ long do_utimes(int dfd, const char __user *filename, struct timespec64 *times,
 
                if (!(flags & AT_SYMLINK_NOFOLLOW))
                        lookup_flags |= LOOKUP_FOLLOW;
+               if (flags & AT_EMPTY_PATH)
+                       lookup_flags |= LOOKUP_EMPTY;
 retry:
                error = user_path_at(dfd, filename, lookup_flags, &path);
                if (error)