Commit 6b48c5b2 authored by Al Viro's avatar Al Viro

switch fallocate(2) to fget_light()

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent bf2965d5
......@@ -277,12 +277,12 @@ int do_fallocate(struct file *file, int mode, loff_t offset, loff_t len)
SYSCALL_DEFINE(fallocate)(int fd, int mode, loff_t offset, loff_t len)
{
struct file *file;
int error = -EBADF;
int error = -EBADF, fput_needed;
file = fget(fd);
file = fget_light(fd, &fput_needed);
if (file) {
error = do_fallocate(file, mode, offset, len);
fput(file);
fput_light(file, fput_needed);
}
return error;
......
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