Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
SYSCALL_DEFINE(fallocate)(int fd, int mode, loff_t offset, loff_t len)
{
struct file *file;
SYSCALL_DEFINE(fallocate)(int fd, int mode, loff_t offset, loff_t len)
{
struct file *file;
+ int error = -EBADF, fput_needed;
+ file = fget_light(fd, &fput_needed);
if (file) {
error = do_fallocate(file, mode, offset, len);
if (file) {
error = do_fallocate(file, mode, offset, len);
+ fput_light(file, fput_needed);