@@ -103,7 +103,7 @@ static int mnt_alloc_id(struct mount *mnt)
int res;
retry:
- ida_pre_get(&mnt_id_ida, GFP_KERNEL);
+ ida_pre_get(&mnt_id_ida, GFP_NOFS);
spin_lock(&mnt_id_lock);
res = ida_get_new_above(&mnt_id_ida, mnt_id_start, &mnt->mnt_id);
if (!res)
@@ -134,7 +134,7 @@ static int mnt_alloc_group_id(struct mount *mnt)
{
int res;
- if (!ida_pre_get(&mnt_group_ida, GFP_KERNEL))
+ if (!ida_pre_get(&mnt_group_ida, GFP_NOFS))
return -ENOMEM;
res = ida_get_new_above(&mnt_group_ida,
@@ -193,7 +193,7 @@ unsigned int mnt_get_count(struct mount *mnt)
static struct mount *alloc_vfsmnt(const char *name)
{
- struct mount *mnt = kmem_cache_zalloc(mnt_cache, GFP_KERNEL);
+ struct mount *mnt = kmem_cache_zalloc(mnt_cache, GFP_NOFS);
if (mnt) {
int err;
@@ -202,7 +202,7 @@ static struct mount *alloc_vfsmnt(const char *name)
goto out_free_cache;
if (name) {
- mnt->mnt_devname = kstrdup(name, GFP_KERNEL);
+ mnt->mnt_devname = kstrdup(name, GFP_NOFS);
if (!mnt->mnt_devname)
goto out_free_id;
}
@@ -682,7 +682,7 @@ static struct mountpoint *new_mountpoint(struct dentry *dentry)
}
}
- mp = kmalloc(sizeof(struct mountpoint), GFP_KERNEL);
+ mp = kmalloc(sizeof(struct mountpoint), GFP_NOFS);
if (!mp)
return ERR_PTR(-ENOMEM);