switch do_fsync() to fget_light()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
Al Viro 2012-04-19 23:52:50 -04:00
parent 442a9ffabb
commit c2bd6c11cd

View File

@ -188,11 +188,12 @@ static int do_fsync(unsigned int fd, int datasync)
{
struct file *file;
int ret = -EBADF;
int fput_needed;
file = fget(fd);
file = fget_light(fd, &fput_needed);
if (file) {
ret = vfs_fsync(file, datasync);
fput(file);
fput_light(file, fput_needed);
}
return ret;
}