btrfs: use GFP_KERNEL in btrfs_init_dev_replace_tgtdev
authorDavid Sterba <dsterba@suse.com>
Thu, 15 Jun 2017 15:16:43 +0000 (17:16 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 19 Jun 2017 16:26:04 +0000 (18:26 +0200)
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 <anand.jain@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/volumes.c

index c10d75fb22024244120dffe25465bea9f6d8893e..8bb1f4e5905aa3090d7436b29addd6f903122abb 100644 (file)
@@ -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;