Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
8319aa91
Commit
8319aa91
authored
Aug 27, 2012
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
switch btrfs_ioctl_clone() to fget_light()
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
515e0d66
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
fs/btrfs/ioctl.c
fs/btrfs/ioctl.c
+3
-3
No files found.
fs/btrfs/ioctl.c
View file @
8319aa91
...
@@ -2350,7 +2350,7 @@ static noinline long btrfs_ioctl_clone(struct file *file, unsigned long srcfd,
...
@@ -2350,7 +2350,7 @@ static noinline long btrfs_ioctl_clone(struct file *file, unsigned long srcfd,
struct
btrfs_key
key
;
struct
btrfs_key
key
;
u32
nritems
;
u32
nritems
;
int
slot
;
int
slot
;
int
ret
;
int
ret
,
fput_needed
;
u64
len
=
olen
;
u64
len
=
olen
;
u64
bs
=
root
->
fs_info
->
sb
->
s_blocksize
;
u64
bs
=
root
->
fs_info
->
sb
->
s_blocksize
;
u64
hint_byte
;
u64
hint_byte
;
...
@@ -2376,7 +2376,7 @@ static noinline long btrfs_ioctl_clone(struct file *file, unsigned long srcfd,
...
@@ -2376,7 +2376,7 @@ static noinline long btrfs_ioctl_clone(struct file *file, unsigned long srcfd,
if
(
ret
)
if
(
ret
)
return
ret
;
return
ret
;
src_file
=
fget
(
srcf
d
);
src_file
=
fget
_light
(
srcfd
,
&
fput_neede
d
);
if
(
!
src_file
)
{
if
(
!
src_file
)
{
ret
=
-
EBADF
;
ret
=
-
EBADF
;
goto
out_drop_write
;
goto
out_drop_write
;
...
@@ -2724,7 +2724,7 @@ static noinline long btrfs_ioctl_clone(struct file *file, unsigned long srcfd,
...
@@ -2724,7 +2724,7 @@ static noinline long btrfs_ioctl_clone(struct file *file, unsigned long srcfd,
vfree
(
buf
);
vfree
(
buf
);
btrfs_free_path
(
path
);
btrfs_free_path
(
path
);
out_fput:
out_fput:
fput
(
src_file
);
fput
_light
(
src_file
,
fput_needed
);
out_drop_write:
out_drop_write:
mnt_drop_write_file
(
file
);
mnt_drop_write_file
(
file
);
return
ret
;
return
ret
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment