projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
switch simple cases of fget_light to fdget
[cascardo/linux.git]
/
fs
/
utimes.c
diff --git
a/fs/utimes.c
b/fs/utimes.c
index
fa4dbe4
..
bb0696a
100644
(file)
--- a/
fs/utimes.c
+++ b/
fs/utimes.c
@@
-140,19
+140,18
@@
long do_utimes(int dfd, const char __user *filename, struct timespec *times,
goto out;
if (filename == NULL && dfd != AT_FDCWD) {
goto out;
if (filename == NULL && dfd != AT_FDCWD) {
- int fput_needed;
- struct file *file;
+ struct fd f;
if (flags & AT_SYMLINK_NOFOLLOW)
goto out;
if (flags & AT_SYMLINK_NOFOLLOW)
goto out;
- f
ile = fget_light(dfd, &fput_neede
d);
+ f
= fdget(df
d);
error = -EBADF;
error = -EBADF;
- if (!file)
+ if (!f
.f
ile)
goto out;
goto out;
- error = utimes_common(&file->f_path, times);
- f
put_light(file, fput_needed
);
+ error = utimes_common(&f
.f
ile->f_path, times);
+ f
dput(f
);
} else {
struct path path;
int lookup_flags = 0;
} else {
struct path path;
int lookup_flags = 0;