switch EXT4_IOC_MOVE_EXT to fget_light()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
4557c669ef
commit
6bdf295401
1 changed files with 3 additions and 3 deletions
|
@ -234,7 +234,7 @@ long ext4_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
|
|||
case EXT4_IOC_MOVE_EXT: {
|
||||
struct move_extent me;
|
||||
struct file *donor_filp;
|
||||
int err;
|
||||
int err, fput_needed;
|
||||
|
||||
if (!(filp->f_mode & FMODE_READ) ||
|
||||
!(filp->f_mode & FMODE_WRITE))
|
||||
|
@ -245,7 +245,7 @@ long ext4_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
|
|||
return -EFAULT;
|
||||
me.moved_len = 0;
|
||||
|
||||
donor_filp = fget(me.donor_fd);
|
||||
donor_filp = fget_light(me.donor_fd, &fput_needed);
|
||||
if (!donor_filp)
|
||||
return -EBADF;
|
||||
|
||||
|
@ -274,7 +274,7 @@ long ext4_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
|
|||
&me, sizeof(me)))
|
||||
err = -EFAULT;
|
||||
mext_out:
|
||||
fput(donor_filp);
|
||||
fput_light(donor_filp, fput_needed);
|
||||
return err;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue