Skip to content

Commit 7273ed4

Browse files
author
Al Viro
committed
do_utimes_path(): switch to CLASS(filename_uflags)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent 4e9654c commit 7273ed4

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

fs/utimes.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,27 +84,24 @@ static int do_utimes_path(int dfd, const char __user *filename,
8484
{
8585
struct path path;
8686
int lookup_flags = 0, error;
87-
struct filename *name;
8887

8988
if (flags & ~(AT_SYMLINK_NOFOLLOW | AT_EMPTY_PATH))
9089
return -EINVAL;
9190

9291
if (!(flags & AT_SYMLINK_NOFOLLOW))
9392
lookup_flags |= LOOKUP_FOLLOW;
94-
name = getname_uflags(filename, flags);
9593

94+
CLASS(filename_uflags, name)(filename, flags);
9695
retry:
9796
error = filename_lookup(dfd, name, lookup_flags, &path, NULL);
9897
if (error)
99-
goto out;
98+
return error;
10099
error = vfs_utimes(&path, times);
101100
path_put(&path);
102101
if (retry_estale(error, lookup_flags)) {
103102
lookup_flags |= LOOKUP_REVAL;
104103
goto retry;
105104
}
106-
out:
107-
putname(name);
108105
return error;
109106
}
110107

0 commit comments

Comments
 (0)