switch simple cases of fget_light to fdget

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
Al Viro
2012-08-28 12:52:22 -04:00
부모 a5b470ba06
커밋 2903ff019b
44개의 변경된 파일631개의 추가작업 그리고 761개의 파일을 삭제

파일 보기

@@ -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;