Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 332558
b: refs/heads/master
c: 425d17a
h: refs/heads/master
v: v3
  • Loading branch information
Liu Bo authored and Chris Mason committed Oct 1, 2012
1 parent 62afb8a commit 24d9dd6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: df031f0752d50f2061df2847d57ea52a79f7977c
refs/heads/master: 425d17a290c0c63785ec65db154a95c6337aeefa
5 changes: 3 additions & 2 deletions trunk/fs/btrfs/backref.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* Boston, MA 021110-1307, USA.
*/

#include <linux/vmalloc.h>
#include "ctree.h"
#include "disk-io.h"
#include "backref.h"
Expand Down Expand Up @@ -1584,7 +1585,7 @@ struct btrfs_data_container *init_data_container(u32 total_bytes)
size_t alloc_bytes;

alloc_bytes = max_t(size_t, total_bytes, sizeof(*data));
data = kmalloc(alloc_bytes, GFP_NOFS);
data = vmalloc(alloc_bytes);
if (!data)
return ERR_PTR(-ENOMEM);

Expand Down Expand Up @@ -1635,6 +1636,6 @@ void free_ipath(struct inode_fs_paths *ipath)
{
if (!ipath)
return;
kfree(ipath->fspath);
vfree(ipath->fspath);
kfree(ipath);
}
4 changes: 2 additions & 2 deletions trunk/fs/btrfs/ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -3230,7 +3230,7 @@ static long btrfs_ioctl_logical_to_ino(struct btrfs_root *root,
goto out;
}

size = min_t(u32, loi->size, 4096);
size = min_t(u32, loi->size, 64 * 1024);
inodes = init_data_container(size);
if (IS_ERR(inodes)) {
ret = PTR_ERR(inodes);
Expand All @@ -3252,7 +3252,7 @@ static long btrfs_ioctl_logical_to_ino(struct btrfs_root *root,

out:
btrfs_free_path(path);
kfree(inodes);
vfree(inodes);
kfree(loi);

return ret;
Expand Down

0 comments on commit 24d9dd6

Please sign in to comment.