Skip to contentSkip to conversation

btrfs: use GFP_KERNEL in btrfs_calc_avail_data_space

PATCH In review David Sterba 2 participants 2 messages Jun 15, 2017 Btrfs file system

lore
Share & tools
lore

David Sterba

author maintainer
#0 lore raw

PATCH 1/1 btrfs: use GFP_KERNEL in btrfs_calc_avail_data_space

We don't hold any locks here. Inidirectly called from statfs.

---
 fs/btrfs/super.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/btrfs/super.c +1 -1
index 4f1cdd5058f1..6f2e68b36362 100644
@@ -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;
 
Signature · 1 line
2.13.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 1 line · David Sterba

We don't hold any locks here. Inidirectly called from statfs.

Quoted 19 lines
---
  fs/btrfs/super.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
fs/btrfs/super.c +1 -1
index 4f1cdd5058f1..6f2e68b36362 100644
@@ -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;