switch fallocate(2) to fget_light()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
diff --git a/fs/open.c b/fs/open.c
index 9f61d72..da6d3f1 100644
--- a/fs/open.c
+++ b/fs/open.c
@@ -277,12 +277,12 @@
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;