summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-04-22 00:47:57 +0200
committerAl Viro <viro@zeniv.linux.org.uk>2012-05-30 05:28:32 +0200
commitc217a2a004d98d09dfceec3a023c563ed800e833 (patch)
tree3e6b3060da67050274bee8155de5d615f5c11aa6 /fs
parentswitch statfs to fget_light/fput_light (diff)
downloadlinux-c217a2a004d98d09dfceec3a023c563ed800e833.tar.xz
linux-c217a2a004d98d09dfceec3a023c563ed800e833.zip
switch utimes() to fget_light/fput_light
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs')
-rw-r--r--fs/utimes.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/utimes.c b/fs/utimes.c
index ba653f3dc1bc..fa4dbe451e27 100644
--- a/fs/utimes.c
+++ b/fs/utimes.c
@@ -140,18 +140,19 @@ 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;
if (flags & AT_SYMLINK_NOFOLLOW)
goto out;
- file = fget(dfd);
+ file = fget_light(dfd, &fput_needed);
error = -EBADF;
if (!file)
goto out;
error = utimes_common(&file->f_path, times);
- fput(file);
+ fput_light(file, fput_needed);
} else {
struct path path;
int lookup_flags = 0;