aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/btrfs/backref.c5
-rw-r--r--fs/btrfs/ioctl.c4
2 files changed, 5 insertions, 4 deletions
diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c
index ab286e5bfe33..7084431b7c9c 100644
--- a/fs/btrfs/backref.c
+++ b/fs/btrfs/backref.c
@@ -16,6 +16,7 @@
16 * Boston, MA 021110-1307, USA. 16 * Boston, MA 021110-1307, USA.
17 */ 17 */
18 18
19#include <linux/vmalloc.h>
19#include "ctree.h" 20#include "ctree.h"
20#include "disk-io.h" 21#include "disk-io.h"
21#include "backref.h" 22#include "backref.h"
@@ -1584,7 +1585,7 @@ struct btrfs_data_container *init_data_container(u32 total_bytes)
1584 size_t alloc_bytes; 1585 size_t alloc_bytes;
1585 1586
1586 alloc_bytes = max_t(size_t, total_bytes, sizeof(*data)); 1587 alloc_bytes = max_t(size_t, total_bytes, sizeof(*data));
1587 data = kmalloc(alloc_bytes, GFP_NOFS); 1588 data = vmalloc(alloc_bytes);
1588 if (!data) 1589 if (!data)
1589 return ERR_PTR(-ENOMEM); 1590 return ERR_PTR(-ENOMEM);
1590 1591
@@ -1635,6 +1636,6 @@ void free_ipath(struct inode_fs_paths *ipath)
1635{ 1636{
1636 if (!ipath) 1637 if (!ipath)
1637 return; 1638 return;
1638 kfree(ipath->fspath); 1639 vfree(ipath->fspath);
1639 kfree(ipath); 1640 kfree(ipath);
1640} 1641}
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index fa1284d596ea..38e3d6ab89d3 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -3230,7 +3230,7 @@ static long btrfs_ioctl_logical_to_ino(struct btrfs_root *root,
3230 goto out; 3230 goto out;
3231 } 3231 }
3232 3232
3233 size = min_t(u32, loi->size, 4096); 3233 size = min_t(u32, loi->size, 64 * 1024);
3234 inodes = init_data_container(size); 3234 inodes = init_data_container(size);
3235 if (IS_ERR(inodes)) { 3235 if (IS_ERR(inodes)) {
3236 ret = PTR_ERR(inodes); 3236 ret = PTR_ERR(inodes);
@@ -3252,7 +3252,7 @@ static long btrfs_ioctl_logical_to_ino(struct btrfs_root *root,
3252 3252
3253out: 3253out:
3254 btrfs_free_path(path); 3254 btrfs_free_path(path);
3255 kfree(inodes); 3255 vfree(inodes);
3256 kfree(loi); 3256 kfree(loi);
3257 3257
3258 return ret; 3258 return ret;