projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2f91306
)
btrfs: clone: use vmalloc only as fallback for nodesize bufer
author
David Sterba
<dsterba@suse.com>
Mon, 11 Apr 2016 16:40:08 +0000
(18:40 +0200)
committer
David Sterba
<dsterba@suse.com>
Fri, 6 May 2016 13:22:49 +0000
(15:22 +0200)
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/ioctl.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/btrfs/ioctl.c
b/fs/btrfs/ioctl.c
index f545f81f642d08dfeb7bfa403778ae82262f9531..cfa7d47b1ba048f3c0d9d24b536096e024d91f76 100644
(file)
--- a/
fs/btrfs/ioctl.c
+++ b/
fs/btrfs/ioctl.c
@@
-3468,13
+3468,16
@@
static int btrfs_clone(struct inode *src, struct inode *inode,
u64 last_dest_end = destoff;
ret = -ENOMEM;
- buf = vmalloc(root->nodesize);
- if (!buf)
- return ret;
+ buf = kmalloc(root->nodesize, GFP_KERNEL | __GFP_NOWARN);
+ if (!buf) {
+ buf = vmalloc(root->nodesize);
+ if (!buf)
+ return ret;
+ }
path = btrfs_alloc_path();
if (!path) {
- vfree(buf);
+
k
vfree(buf);
return ret;
}
@@
-3775,7
+3778,7
@@
process_slot:
out:
btrfs_free_path(path);
- vfree(buf);
+
k
vfree(buf);
return ret;
}