Skip to content

Commit f676630

Browse files
committed
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 <[email protected]>
1 parent 249f374 commit f676630

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

fs/udf/dir.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ static int udf_readdir(struct file *file, struct dir_context *ctx)
6767
pos_valid = true;
6868
}
6969

70-
fname = kmalloc(UDF_NAME_LEN, GFP_NOFS);
70+
fname = kmalloc(UDF_NAME_LEN, GFP_KERNEL);
7171
if (!fname) {
7272
ret = -ENOMEM;
7373
goto out;

fs/udf/namei.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ static int udf_fiiter_find_entry(struct inode *dir, const struct qstr *child,
5959
child->name[0] == '.' && child->name[1] == '.';
6060
int ret;
6161

62-
fname = kmalloc(UDF_NAME_LEN, GFP_NOFS);
62+
fname = kmalloc(UDF_NAME_LEN, GFP_KERNEL);
6363
if (!fname)
6464
return -ENOMEM;
6565

0 commit comments

Comments
 (0)