diff mbox

btrfs: use GFP_KERNEL in btrfs_init_dev_replace_tgtdev

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

Commit Message

David Sterba June 15, 2017, 3:15 p.m. UTC
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.

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

Comments

Anand Jain June 15, 2017, 9:12 p.m. UTC | #1
On 06/15/2017 11:15 PM, David Sterba wrote:
> 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.

  yeah volume_mutex is fine.

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

> Signed-off-by: David Sterba <dsterba@suse.com>
> ---
>   fs/btrfs/dev-replace.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/btrfs/dev-replace.c b/fs/btrfs/dev-replace.c
> index c6cd1d599c36..f7df85509125 100644
> --- a/fs/btrfs/dev-replace.c
> +++ b/fs/btrfs/dev-replace.c
> @@ -242,7 +242,7 @@ static 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;
> 
--
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/dev-replace.c b/fs/btrfs/dev-replace.c
index c6cd1d599c36..f7df85509125 100644
--- a/fs/btrfs/dev-replace.c
+++ b/fs/btrfs/dev-replace.c
@@ -242,7 +242,7 @@  static 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;