unsigned long vlen)
{
struct file *file;
+ int fput_needed;
ssize_t ret;
- file = fget(fd);
+ file = fget_light(fd, &fput_needed);
if (!file)
return -EBADF;
ret = compat_readv(file, vec, vlen, &file->f_pos);
- fput(file);
+ fput_light(file, fput_needed);
return ret;
}
{
loff_t pos = ((loff_t)pos_high << 32) | pos_low;
struct file *file;
+ int fput_needed;
ssize_t ret;
if (pos < 0)
return -EINVAL;
- file = fget(fd);
+ file = fget_light(fd, &fput_needed);
if (!file)
return -EBADF;
ret = compat_readv(file, vec, vlen, &pos);
- fput(file);
+ fput_light(file, fput_needed);
return ret;
}
unsigned long vlen)
{
struct file *file;
+ int fput_needed;
ssize_t ret;
- file = fget(fd);
+ file = fget_light(fd, &fput_needed);
if (!file)
return -EBADF;
ret = compat_writev(file, vec, vlen, &file->f_pos);
- fput(file);
+ fput_light(file, fput_needed);
return ret;
}
{
loff_t pos = ((loff_t)pos_high << 32) | pos_low;
struct file *file;
+ int fput_needed;
ssize_t ret;
if (pos < 0)
return -EINVAL;
- file = fget(fd);
+ file = fget_light(fd, &fput_needed);
if (!file)
return -EBADF;
ret = compat_writev(file, vec, vlen, &pos);
- fput(file);
+ fput_light(file, fput_needed);
return ret;
}