diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-08-26 21:01:46 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-09-26 21:10:06 -0400 |
commit | 6bdf2954016ef7c1f4d4fa07a338ee197d9c3506 (patch) | |
tree | bc292e381755517853bfba8df7a79b64e08d8528 /fs/ext4/ioctl.c | |
parent | 4557c669ef9801d96cf663331cdd1dcb8fa9c2f1 (diff) |
switch EXT4_IOC_MOVE_EXT to fget_light()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/ext4/ioctl.c')
-rw-r--r-- | fs/ext4/ioctl.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/ext4/ioctl.c b/fs/ext4/ioctl.c index a0ee682dc394..39646f224514 100644 --- a/fs/ext4/ioctl.c +++ b/fs/ext4/ioctl.c | |||
@@ -234,7 +234,7 @@ group_extend_out: | |||
234 | case EXT4_IOC_MOVE_EXT: { | 234 | case EXT4_IOC_MOVE_EXT: { |
235 | struct move_extent me; | 235 | struct move_extent me; |
236 | struct file *donor_filp; | 236 | struct file *donor_filp; |
237 | int err; | 237 | int err, fput_needed; |
238 | 238 | ||
239 | if (!(filp->f_mode & FMODE_READ) || | 239 | if (!(filp->f_mode & FMODE_READ) || |
240 | !(filp->f_mode & FMODE_WRITE)) | 240 | !(filp->f_mode & FMODE_WRITE)) |
@@ -245,7 +245,7 @@ group_extend_out: | |||
245 | return -EFAULT; | 245 | return -EFAULT; |
246 | me.moved_len = 0; | 246 | me.moved_len = 0; |
247 | 247 | ||
248 | donor_filp = fget(me.donor_fd); | 248 | donor_filp = fget_light(me.donor_fd, &fput_needed); |
249 | if (!donor_filp) | 249 | if (!donor_filp) |
250 | return -EBADF; | 250 | return -EBADF; |
251 | 251 | ||
@@ -274,7 +274,7 @@ group_extend_out: | |||
274 | &me, sizeof(me))) | 274 | &me, sizeof(me))) |
275 | err = -EFAULT; | 275 | err = -EFAULT; |
276 | mext_out: | 276 | mext_out: |
277 | fput(donor_filp); | 277 | fput_light(donor_filp, fput_needed); |
278 | return err; | 278 | return err; |
279 | } | 279 | } |
280 | 280 | ||