btrfs: use GFP_KERNEL in mount and remount
We don't need to restrict the allocation flags in btrfs_mount or _remount. No big filesystem locks are held (possibly s_umount but that does no count here). Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
Родитель
e3f3ad1268
Коммит
3ec8362111
|
@ -426,7 +426,7 @@ int btrfs_parse_options(struct btrfs_fs_info *info, char *options,
|
||||||
* strsep changes the string, duplicate it because parse_options
|
* strsep changes the string, duplicate it because parse_options
|
||||||
* gets called twice
|
* gets called twice
|
||||||
*/
|
*/
|
||||||
options = kstrdup(options, GFP_NOFS);
|
options = kstrdup(options, GFP_KERNEL);
|
||||||
if (!options)
|
if (!options)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
|
@ -950,7 +950,7 @@ static char *get_subvol_name_from_objectid(struct btrfs_fs_info *fs_info,
|
||||||
}
|
}
|
||||||
path->leave_spinning = 1;
|
path->leave_spinning = 1;
|
||||||
|
|
||||||
name = kmalloc(PATH_MAX, GFP_NOFS);
|
name = kmalloc(PATH_MAX, GFP_KERNEL);
|
||||||
if (!name) {
|
if (!name) {
|
||||||
ret = -ENOMEM;
|
ret = -ENOMEM;
|
||||||
goto err;
|
goto err;
|
||||||
|
@ -1336,10 +1336,11 @@ static char *setup_root_args(char *args)
|
||||||
char *buf, *dst, *sep;
|
char *buf, *dst, *sep;
|
||||||
|
|
||||||
if (!args)
|
if (!args)
|
||||||
return kstrdup("subvolid=0", GFP_NOFS);
|
return kstrdup("subvolid=0", GFP_KERNEL);
|
||||||
|
|
||||||
/* The worst case is that we add ",subvolid=0" to the end. */
|
/* The worst case is that we add ",subvolid=0" to the end. */
|
||||||
buf = dst = kmalloc(strlen(args) + strlen(",subvolid=0") + 1, GFP_NOFS);
|
buf = dst = kmalloc(strlen(args) + strlen(",subvolid=0") + 1,
|
||||||
|
GFP_KERNEL);
|
||||||
if (!buf)
|
if (!buf)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
@ -1568,7 +1569,7 @@ static struct dentry *btrfs_mount(struct file_system_type *fs_type, int flags,
|
||||||
* it for searching for existing supers, so this lets us do that and
|
* it for searching for existing supers, so this lets us do that and
|
||||||
* then open_ctree will properly initialize everything later.
|
* then open_ctree will properly initialize everything later.
|
||||||
*/
|
*/
|
||||||
fs_info = kzalloc(sizeof(struct btrfs_fs_info), GFP_NOFS);
|
fs_info = kzalloc(sizeof(struct btrfs_fs_info), GFP_KERNEL);
|
||||||
if (!fs_info) {
|
if (!fs_info) {
|
||||||
error = -ENOMEM;
|
error = -ENOMEM;
|
||||||
goto error_sec_opts;
|
goto error_sec_opts;
|
||||||
|
@ -1576,8 +1577,8 @@ static struct dentry *btrfs_mount(struct file_system_type *fs_type, int flags,
|
||||||
|
|
||||||
fs_info->fs_devices = fs_devices;
|
fs_info->fs_devices = fs_devices;
|
||||||
|
|
||||||
fs_info->super_copy = kzalloc(BTRFS_SUPER_INFO_SIZE, GFP_NOFS);
|
fs_info->super_copy = kzalloc(BTRFS_SUPER_INFO_SIZE, GFP_KERNEL);
|
||||||
fs_info->super_for_commit = kzalloc(BTRFS_SUPER_INFO_SIZE, GFP_NOFS);
|
fs_info->super_for_commit = kzalloc(BTRFS_SUPER_INFO_SIZE, GFP_KERNEL);
|
||||||
security_init_mnt_opts(&fs_info->security_opts);
|
security_init_mnt_opts(&fs_info->security_opts);
|
||||||
if (!fs_info->super_copy || !fs_info->super_for_commit) {
|
if (!fs_info->super_copy || !fs_info->super_for_commit) {
|
||||||
error = -ENOMEM;
|
error = -ENOMEM;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче