@@ -289,7 +289,7 @@ int btrfs_acl_chmod(struct inode *inode)
if (IS_ERR(acl) || !acl)
return PTR_ERR(acl);
- clone = posix_acl_clone(acl, GFP_KERNEL);
+ clone = posix_acl_clone(acl, GFP_NOFS);
posix_acl_release(acl);
if (!clone)
return -ENOMEM;
@@ -998,7 +998,7 @@ static ssize_t btrfs_file_aio_write(struct kiocb *iocb,
nrptrs = min((iov_iter_count(&i) + PAGE_CACHE_SIZE - 1) /
PAGE_CACHE_SIZE, PAGE_CACHE_SIZE /
(sizeof(struct page *)));
- pages = kmalloc(nrptrs * sizeof(struct page *), GFP_KERNEL);
+ pages = kmalloc(nrptrs * sizeof(struct page *), GFP_NOFS);
if (!pages) {
ret = -ENOMEM;
goto out;
@@ -1644,7 +1644,7 @@ static int btrfs_ioctl_defrag(struct file *file, void __user *argp)
goto out;
}
- range = kzalloc(sizeof(*range), GFP_KERNEL);
+ range = kzalloc(sizeof(*range), GFP_NOFS);
if (!range) {
ret = -ENOMEM;
goto out;
@@ -399,7 +399,7 @@ static int btrfs_parse_early_options(const char *options, fmode_t flags,
* strsep changes the string, duplicate it because parse_options
* gets called twice
*/
- opts = kstrdup(options, GFP_KERNEL);
+ opts = kstrdup(options, GFP_NOFS);
if (!opts)
return -ENOMEM;
orig = opts;
@@ -446,7 +446,7 @@ static int btrfs_parse_early_options(const char *options, fmode_t flags,
* mount path doesn't care if it's the default volume or another one.
*/
if (!*subvol_name) {
- *subvol_name = kstrdup(".", GFP_KERNEL);
+ *subvol_name = kstrdup(".", GFP_NOFS);
if (!*subvol_name)
return -ENOMEM;
}