Commit c2bd6c11 authored by Al Viro's avatar Al Viro

switch do_fsync() to fget_light()

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 442a9ffa
...@@ -188,11 +188,12 @@ static int do_fsync(unsigned int fd, int datasync) ...@@ -188,11 +188,12 @@ static int do_fsync(unsigned int fd, int datasync)
{ {
struct file *file; struct file *file;
int ret = -EBADF; int ret = -EBADF;
int fput_needed;
file = fget(fd); file = fget_light(fd, &fput_needed);
if (file) { if (file) {
ret = vfs_fsync(file, datasync); ret = vfs_fsync(file, datasync);
fput(file); fput_light(file, fput_needed);
} }
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment