From 6165572c1139dd694afb8e382a5f06e7e0fa4ad8 Mon Sep 17 00:00:00 2001 From: David Sterba Date: Thu, 15 Jun 2017 17:16:43 +0200 Subject: [PATCH] btrfs: use GFP_KERNEL in btrfs_init_dev_replace_tgtdev The function is called from ioctl context and we don't hold any locks that take part in writeback. Right now it's only fs_info::volume_mutex. Reviewed-by: Anand Jain Signed-off-by: David Sterba --- fs/btrfs/volumes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index c10d75fb2202..8bb1f4e5905a 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -2572,7 +2572,7 @@ int btrfs_init_dev_replace_tgtdev(struct btrfs_fs_info *fs_info, goto error; } - name = rcu_string_strdup(device_path, GFP_NOFS); + name = rcu_string_strdup(device_path, GFP_KERNEL); if (!name) { kfree(device); ret = -ENOMEM; -- 2.20.1