Skip to content

Commit

Permalink
btrfs: use GFP_KERNEL in btrfs_init_dev_replace_tgtdev
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David Sterba committed Jun 19, 2017
1 parent 6a44517 commit 6165572
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/btrfs/volumes.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 6165572

Please sign in to comment.