Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2c4b1dd8 authored by Al Viro's avatar Al Viro Committed by Samuel Pascua
Browse files

switch do_fsync() to fget_light()



Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 0545550d
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -222,11 +222,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;
}