btrfs: use GFP_KERNEL for allocations of workqueues
authorDavid Sterba <dsterba@suse.com>
Tue, 1 Dec 2015 17:04:30 +0000 (18:04 +0100)
committerDavid Sterba <dsterba@suse.com>
Thu, 3 Dec 2015 14:03:43 +0000 (15:03 +0100)
We don't have to use GFP_NOFS to allocate workqueue structures, this is
done from mount context or potentially scrub start context, safe to fail
in both cases.

Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/async-thread.c

index 3e36e4adc4a35539e9415951118a974db2794c5a..88d9af3d4581f7c45aa0065fa467d097625be5c1 100644 (file)
@@ -97,7 +97,7 @@ static struct __btrfs_workqueue *
 __btrfs_alloc_workqueue(const char *name, unsigned int flags, int limit_active,
                         int thresh)
 {
-       struct __btrfs_workqueue *ret = kzalloc(sizeof(*ret), GFP_NOFS);
+       struct __btrfs_workqueue *ret = kzalloc(sizeof(*ret), GFP_KERNEL);
 
        if (!ret)
                return NULL;
@@ -148,7 +148,7 @@ struct btrfs_workqueue *btrfs_alloc_workqueue(const char *name,
                                              int limit_active,
                                              int thresh)
 {
-       struct btrfs_workqueue *ret = kzalloc(sizeof(*ret), GFP_NOFS);
+       struct btrfs_workqueue *ret = kzalloc(sizeof(*ret), GFP_KERNEL);
 
        if (!ret)
                return NULL;