diff mbox

btrfs: use GFP_KERNEL in btrfs_calc_avail_data_space

Message ID 20170615130725.466-1-dsterba@suse.com (mailing list archive)
State New, archived
Headers show

Commit Message

David Sterba June 15, 2017, 1:07 p.m. UTC
We don't hold any locks here. Inidirectly called from statfs.

Signed-off-by: David Sterba <dsterba@suse.com>
---
 fs/btrfs/super.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Anand Jain June 15, 2017, 8:44 p.m. UTC | #1
On 06/15/2017 09:07 PM, David Sterba wrote:
> We don't hold any locks here. Inidirectly called from statfs.

  Reviewed-by: Anand Jain <anand.jain@oracle.com>

> Signed-off-by: David Sterba <dsterba@suse.com>
> ---
>   fs/btrfs/super.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
> index 4f1cdd5058f1..6f2e68b36362 100644
> --- a/fs/btrfs/super.c
> +++ b/fs/btrfs/super.c
> @@ -1927,7 +1927,7 @@ static int btrfs_calc_avail_data_space(struct btrfs_fs_info *fs_info,
>   	}
>   
>   	devices_info = kmalloc_array(nr_devices, sizeof(*devices_info),
> -			       GFP_NOFS);
> +			       GFP_KERNEL);
>   	if (!devices_info)
>   		return -ENOMEM;
>   
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index 4f1cdd5058f1..6f2e68b36362 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -1927,7 +1927,7 @@  static int btrfs_calc_avail_data_space(struct btrfs_fs_info *fs_info,
 	}
 
 	devices_info = kmalloc_array(nr_devices, sizeof(*devices_info),
-			       GFP_NOFS);
+			       GFP_KERNEL);
 	if (!devices_info)
 		return -ENOMEM;