* [PATCH] btrfs: use GFP_KERNEL in btrfs_init_dev_replace_tgtdev
@ 2017-06-15 15:15 David Sterba
2017-06-15 21:12 ` Anand Jain
0 siblings, 1 reply; 2+ messages in thread
From: David Sterba @ 2017-06-15 15:15 UTC (permalink / raw)
To: linux-btrfs; +Cc: David Sterba
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(-)
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;
--
2.13.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] btrfs: use GFP_KERNEL in btrfs_init_dev_replace_tgtdev
2017-06-15 15:15 [PATCH] btrfs: use GFP_KERNEL in btrfs_init_dev_replace_tgtdev David Sterba
@ 2017-06-15 21:12 ` Anand Jain
0 siblings, 0 replies; 2+ messages in thread
From: Anand Jain @ 2017-06-15 21:12 UTC (permalink / raw)
To: David Sterba, linux-btrfs
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;
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-06-15 21:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-15 15:15 [PATCH] btrfs: use GFP_KERNEL in btrfs_init_dev_replace_tgtdev David Sterba
2017-06-15 21:12 ` Anand Jain
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).