diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-08-27 03:18:55 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-09-26 21:10:09 -0400 |
commit | 8319aa9127a1282b24c3ece473a058d246f35b0d (patch) | |
tree | 600f21c7ce0586ba60fcb53cc56130672ca221f6 /fs | |
parent | 515e0d6634086d61ae846f0e8785b6f0220f3422 (diff) |
switch btrfs_ioctl_clone() to fget_light()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/btrfs/ioctl.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 3c88abb0e265..3494f2f44167 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c | |||
@@ -2350,7 +2350,7 @@ static noinline long btrfs_ioctl_clone(struct file *file, unsigned long srcfd, | |||
2350 | struct btrfs_key key; | 2350 | struct btrfs_key key; |
2351 | u32 nritems; | 2351 | u32 nritems; |
2352 | int slot; | 2352 | int slot; |
2353 | int ret; | 2353 | int ret, fput_needed; |
2354 | u64 len = olen; | 2354 | u64 len = olen; |
2355 | u64 bs = root->fs_info->sb->s_blocksize; | 2355 | u64 bs = root->fs_info->sb->s_blocksize; |
2356 | u64 hint_byte; | 2356 | u64 hint_byte; |
@@ -2376,7 +2376,7 @@ static noinline long btrfs_ioctl_clone(struct file *file, unsigned long srcfd, | |||
2376 | if (ret) | 2376 | if (ret) |
2377 | return ret; | 2377 | return ret; |
2378 | 2378 | ||
2379 | src_file = fget(srcfd); | 2379 | src_file = fget_light(srcfd, &fput_needed); |
2380 | if (!src_file) { | 2380 | if (!src_file) { |
2381 | ret = -EBADF; | 2381 | ret = -EBADF; |
2382 | goto out_drop_write; | 2382 | goto out_drop_write; |
@@ -2724,7 +2724,7 @@ out_unlock: | |||
2724 | vfree(buf); | 2724 | vfree(buf); |
2725 | btrfs_free_path(path); | 2725 | btrfs_free_path(path); |
2726 | out_fput: | 2726 | out_fput: |
2727 | fput(src_file); | 2727 | fput_light(src_file, fput_needed); |
2728 | out_drop_write: | 2728 | out_drop_write: |
2729 | mnt_drop_write_file(file); | 2729 | mnt_drop_write_file(file); |
2730 | return ret; | 2730 | return ret; |