mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 01:04:41 +01:00
do_utimes_path(): switch to CLASS(filename_uflags)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
4e9654c2bb
commit
7273ed4e78
1 changed files with 2 additions and 5 deletions
|
|
@ -84,27 +84,24 @@ static int do_utimes_path(int dfd, const char __user *filename,
|
|||
{
|
||||
struct path path;
|
||||
int lookup_flags = 0, error;
|
||||
struct filename *name;
|
||||
|
||||
if (flags & ~(AT_SYMLINK_NOFOLLOW | AT_EMPTY_PATH))
|
||||
return -EINVAL;
|
||||
|
||||
if (!(flags & AT_SYMLINK_NOFOLLOW))
|
||||
lookup_flags |= LOOKUP_FOLLOW;
|
||||
name = getname_uflags(filename, flags);
|
||||
|
||||
CLASS(filename_uflags, name)(filename, flags);
|
||||
retry:
|
||||
error = filename_lookup(dfd, name, lookup_flags, &path, NULL);
|
||||
if (error)
|
||||
goto out;
|
||||
return error;
|
||||
error = vfs_utimes(&path, times);
|
||||
path_put(&path);
|
||||
if (retry_estale(error, lookup_flags)) {
|
||||
lookup_flags |= LOOKUP_REVAL;
|
||||
goto retry;
|
||||
}
|
||||
out:
|
||||
putname(name);
|
||||
return error;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue