utimes.c (f419a2e3b64def707e1384ee38abb77f99af5f6d) | utimes.c (2d8f30380ab8c706f4e0a8f1aaa22b5886e9ac8a) |
---|---|
1#include <linux/compiler.h> 2#include <linux/file.h> 3#include <linux/fs.h> 4#include <linux/linkage.h> 5#include <linux/mount.h> 6#include <linux/namei.h> 7#include <linux/sched.h> 8#include <linux/stat.h> --- 138 unchanged lines hidden (view full) --- 147 file = fget(dfd); 148 error = -EBADF; 149 if (!file) 150 goto out; 151 152 error = utimes_common(&file->f_path, times); 153 fput(file); 154 } else { | 1#include <linux/compiler.h> 2#include <linux/file.h> 3#include <linux/fs.h> 4#include <linux/linkage.h> 5#include <linux/mount.h> 6#include <linux/namei.h> 7#include <linux/sched.h> 8#include <linux/stat.h> --- 138 unchanged lines hidden (view full) --- 147 file = fget(dfd); 148 error = -EBADF; 149 if (!file) 150 goto out; 151 152 error = utimes_common(&file->f_path, times); 153 fput(file); 154 } else { |
155 struct nameidata nd; | 155 struct path path; |
156 int lookup_flags = 0; 157 158 if (!(flags & AT_SYMLINK_NOFOLLOW)) 159 lookup_flags |= LOOKUP_FOLLOW; 160 | 156 int lookup_flags = 0; 157 158 if (!(flags & AT_SYMLINK_NOFOLLOW)) 159 lookup_flags |= LOOKUP_FOLLOW; 160 |
161 error = __user_walk_fd(dfd, filename, lookup_flags, &nd); | 161 error = user_path_at(dfd, filename, lookup_flags, &path); |
162 if (error) 163 goto out; 164 | 162 if (error) 163 goto out; 164 |
165 error = utimes_common(&nd.path, times); 166 path_put(&nd.path); | 165 error = utimes_common(&path, times); 166 path_put(&path); |
167 } 168 169out: 170 return error; 171} 172 173asmlinkage long sys_utimensat(int dfd, char __user *filename, struct timespec __user *utimes, int flags) 174{ --- 46 unchanged lines hidden --- | 167 } 168 169out: 170 return error; 171} 172 173asmlinkage long sys_utimensat(int dfd, char __user *filename, struct timespec __user *utimes, int flags) 174{ --- 46 unchanged lines hidden --- |