diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 3e744dd17ac5e3d65ad504f2fd3a8c081f5e65ea..4d1b07b815495a71b64fdd9b854950ae2636bfa0 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -1277,7 +1277,7 @@ int btrfs_defrag_file(struct inode *inode, struct file *file, * context */ if (!file) { - ra = kzalloc(sizeof(*ra), GFP_NOFS); + ra = kzalloc(sizeof(*ra), GFP_KERNEL); if (!ra) return -ENOMEM; file_ra_state_init(ra, inode->i_mapping); @@ -1285,8 +1285,7 @@ int btrfs_defrag_file(struct inode *inode, struct file *file, ra = &file->f_ra; } - pages = kmalloc_array(max_cluster, sizeof(struct page *), - GFP_NOFS); + pages = kmalloc_array(max_cluster, sizeof(struct page *), GFP_KERNEL); if (!pages) { ret = -ENOMEM; goto out_ra;