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
nexedi
linux
Commits
15351955
Commit
15351955
authored
Apr 11, 2016
by
David Sterba
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
btrfs: clone: use vmalloc only as fallback for nodesize bufer
Signed-off-by:
David Sterba
<
dsterba@suse.com
>
parent
2f91306a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
fs/btrfs/ioctl.c
fs/btrfs/ioctl.c
+8
-5
No files found.
fs/btrfs/ioctl.c
View file @
15351955
...
@@ -3468,13 +3468,16 @@ static int btrfs_clone(struct inode *src, struct inode *inode,
...
@@ -3468,13 +3468,16 @@ static int btrfs_clone(struct inode *src, struct inode *inode,
u64
last_dest_end
=
destoff
;
u64
last_dest_end
=
destoff
;
ret
=
-
ENOMEM
;
ret
=
-
ENOMEM
;
buf
=
vmalloc
(
root
->
nodesize
);
buf
=
kmalloc
(
root
->
nodesize
,
GFP_KERNEL
|
__GFP_NOWARN
);
if
(
!
buf
)
if
(
!
buf
)
{
return
ret
;
buf
=
vmalloc
(
root
->
nodesize
);
if
(
!
buf
)
return
ret
;
}
path
=
btrfs_alloc_path
();
path
=
btrfs_alloc_path
();
if
(
!
path
)
{
if
(
!
path
)
{
vfree
(
buf
);
k
vfree
(
buf
);
return
ret
;
return
ret
;
}
}
...
@@ -3775,7 +3778,7 @@ static int btrfs_clone(struct inode *src, struct inode *inode,
...
@@ -3775,7 +3778,7 @@ static int btrfs_clone(struct inode *src, struct inode *inode,
out:
out:
btrfs_free_path
(
path
);
btrfs_free_path
(
path
);
vfree
(
buf
);
k
vfree
(
buf
);
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