diff options
author | David Sterba <dsterba@suse.com> | 2017-02-13 05:03:44 -0500 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2017-02-17 06:03:48 -0500 |
commit | 23269bf5eafb3bd8036d9412a80cbfc25f98f1a3 (patch) | |
tree | 27bde2c60653ef5fc3f8a5ee37dc5e89f7c5d1d0 | |
parent | 1af4a0aaa5d4bfcd17020f0620017a3057a9fb8d (diff) |
btrfs: use GFP_KERNEL in create_snapshot
We don't need to use GFP_NOFS here as this is called from ioctls an the
only lock held is the subvol_sem, which is of a high level and protects
creation/renames/deletion and is never held in the writeout paths.
Signed-off-by: David Sterba <dsterba@suse.com>
-rw-r--r-- | fs/btrfs/ioctl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 77f93a1e65c7..f65ace58dd2c 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c | |||
@@ -670,12 +670,12 @@ static int create_snapshot(struct btrfs_root *root, struct inode *dir, | |||
670 | if (!test_bit(BTRFS_ROOT_REF_COWS, &root->state)) | 670 | if (!test_bit(BTRFS_ROOT_REF_COWS, &root->state)) |
671 | return -EINVAL; | 671 | return -EINVAL; |
672 | 672 | ||
673 | pending_snapshot = kzalloc(sizeof(*pending_snapshot), GFP_NOFS); | 673 | pending_snapshot = kzalloc(sizeof(*pending_snapshot), GFP_KERNEL); |
674 | if (!pending_snapshot) | 674 | if (!pending_snapshot) |
675 | return -ENOMEM; | 675 | return -ENOMEM; |
676 | 676 | ||
677 | pending_snapshot->root_item = kzalloc(sizeof(struct btrfs_root_item), | 677 | pending_snapshot->root_item = kzalloc(sizeof(struct btrfs_root_item), |
678 | GFP_NOFS); | 678 | GFP_KERNEL); |
679 | pending_snapshot->path = btrfs_alloc_path(); | 679 | pending_snapshot->path = btrfs_alloc_path(); |
680 | if (!pending_snapshot->root_item || !pending_snapshot->path) { | 680 | if (!pending_snapshot->root_item || !pending_snapshot->path) { |
681 | ret = -ENOMEM; | 681 | ret = -ENOMEM; |