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

switch EXT4_IOC_MOVE_EXT to fget_light()

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 4557c669
...@@ -234,7 +234,7 @@ long ext4_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) ...@@ -234,7 +234,7 @@ long ext4_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
case EXT4_IOC_MOVE_EXT: { case EXT4_IOC_MOVE_EXT: {
struct move_extent me; struct move_extent me;
struct file *donor_filp; struct file *donor_filp;
int err; int err, fput_needed;
if (!(filp->f_mode & FMODE_READ) || if (!(filp->f_mode & FMODE_READ) ||
!(filp->f_mode & FMODE_WRITE)) !(filp->f_mode & FMODE_WRITE))
...@@ -245,7 +245,7 @@ long ext4_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) ...@@ -245,7 +245,7 @@ long ext4_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
return -EFAULT; return -EFAULT;
me.moved_len = 0; me.moved_len = 0;
donor_filp = fget(me.donor_fd); donor_filp = fget_light(me.donor_fd, &fput_needed);
if (!donor_filp) if (!donor_filp)
return -EBADF; return -EBADF;
...@@ -274,7 +274,7 @@ long ext4_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) ...@@ -274,7 +274,7 @@ long ext4_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
&me, sizeof(me))) &me, sizeof(me)))
err = -EFAULT; err = -EFAULT;
mext_out: mext_out:
fput(donor_filp); fput_light(donor_filp, fput_needed);
return err; return err;
} }
......
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