switch utimes() to fget_light/fput_light
authorAl Viro <viro@zeniv.linux.org.uk>
Sat, 21 Apr 2012 22:47:57 +0000 (18:47 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Wed, 30 May 2012 03:28:32 +0000 (23:28 -0400)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/utimes.c

index ba653f3dc1bc9c66010290e53e0bb2a5b8fd94b1..fa4dbe451e278eab0f52bbacc110b157a300cdad 100644 (file)
@@ -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;