btrfs: use GFP_KERNEL in btrfs_init_dev_replace_tgtdev
David Sterba
maintainerPATCH 1/1 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.
Signed-off-by David Sterba <[email protected]>
--- fs/btrfs/dev-replace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/btrfs/dev-replace.c +1 -1
@@ -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 ;
Signature · 1 line
2.13.0
Quoted 2 lines · 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.
yeah volume_mutex is fine.
Reviewed-by Anand Jain <[email protected]>
Quoted 19 lines
Signed-off-by David Sterba <[email protected]>--- fs/btrfs/dev-replace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/btrfs/dev-replace.c +1
-1@@ -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 ;