mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 17:30:02 +00:00
dm btree: use GFP_NOFS in dm_btree_del()
dm_btree_del() is called from an ioctl so don't recurse into FS. Signed-off-by: Joe Thornber <ejt@redhat.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com>
This commit is contained in:
parent
3ba3ba1e84
commit
9f9ef0657d
1 changed files with 6 additions and 1 deletions
|
@ -272,7 +272,12 @@ int dm_btree_del(struct dm_btree_info *info, dm_block_t root)
|
|||
int r;
|
||||
struct del_stack *s;
|
||||
|
||||
s = kmalloc(sizeof(*s), GFP_NOIO);
|
||||
/*
|
||||
* dm_btree_del() is called via an ioctl, as such should be
|
||||
* considered an FS op. We can't recurse back into the FS, so we
|
||||
* allocate GFP_NOFS.
|
||||
*/
|
||||
s = kmalloc(sizeof(*s), GFP_NOFS);
|
||||
if (!s)
|
||||
return -ENOMEM;
|
||||
s->info = info;
|
||||
|
|
Loading…
Reference in a new issue