mirror of
https://github.com/torvalds/linux.git
synced 2024-11-21 19:41:42 +00:00
udf: Remove GFP_NOFS from dir iteration code
Directory iteration code was using GFP_NOFS allocations in two places. However the code is called only under inode->i_rwsem which is generally safe wrt reclaim. So we can do the allocations with GFP_KERNEL instead. Signed-off-by: Jan Kara <jack@suse.cz>
This commit is contained in:
parent
249f374eb9
commit
f6766303c0
@ -67,7 +67,7 @@ static int udf_readdir(struct file *file, struct dir_context *ctx)
|
||||
pos_valid = true;
|
||||
}
|
||||
|
||||
fname = kmalloc(UDF_NAME_LEN, GFP_NOFS);
|
||||
fname = kmalloc(UDF_NAME_LEN, GFP_KERNEL);
|
||||
if (!fname) {
|
||||
ret = -ENOMEM;
|
||||
goto out;
|
||||
|
@ -59,7 +59,7 @@ static int udf_fiiter_find_entry(struct inode *dir, const struct qstr *child,
|
||||
child->name[0] == '.' && child->name[1] == '.';
|
||||
int ret;
|
||||
|
||||
fname = kmalloc(UDF_NAME_LEN, GFP_NOFS);
|
||||
fname = kmalloc(UDF_NAME_LEN, GFP_KERNEL);
|
||||
if (!fname)
|
||||
return -ENOMEM;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user