summaryrefslogtreecommitdiffstats
path: root/fs/utimes.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-08-28 12:52:22 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-09-26 22:20:08 -0400
commit2903ff019b346ab8d36ebbf54853c3aaf6590608 (patch)
tree962d94054765bb37bc00e977c3036e65c5fd91fe /fs/utimes.c
parenta5b470ba06aa3f96999ede5feba178df6bdb134a (diff)
downloadop-kernel-dev-2903ff019b346ab8d36ebbf54853c3aaf6590608.zip
op-kernel-dev-2903ff019b346ab8d36ebbf54853c3aaf6590608.tar.gz
switch simple cases of fget_light to fdget
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/utimes.c')
-rw-r--r--fs/utimes.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/fs/utimes.c b/fs/utimes.c
index fa4dbe4..bb0696a 100644
--- 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) {
- int fput_needed;
- struct file *file;
+ struct fd f;
if (flags & AT_SYMLINK_NOFOLLOW)
goto out;
- file = fget_light(dfd, &fput_needed);
+ f = fdget(dfd);
error = -EBADF;
- if (!file)
+ if (!f.file)
goto out;
- error = utimes_common(&file->f_path, times);
- fput_light(file, fput_needed);
+ error = utimes_common(&f.file->f_path, times);
+ fdput(f);
} else {
struct path path;
int lookup_flags = 0;
OpenPOWER on IntegriCloud