Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

Jan Kara f6766303 249f374e

+2 -2
+1 -1
fs/udf/dir.c
··· 67 67 pos_valid = true; 68 68 } 69 69 70 - fname = kmalloc(UDF_NAME_LEN, GFP_NOFS); 70 + fname = kmalloc(UDF_NAME_LEN, GFP_KERNEL); 71 71 if (!fname) { 72 72 ret = -ENOMEM; 73 73 goto out;
+1 -1
fs/udf/namei.c
··· 59 59 child->name[0] == '.' && child->name[1] == '.'; 60 60 int ret; 61 61 62 - fname = kmalloc(UDF_NAME_LEN, GFP_NOFS); 62 + fname = kmalloc(UDF_NAME_LEN, GFP_KERNEL); 63 63 if (!fname) 64 64 return -ENOMEM; 65 65