[Devel] Re: [PATCH] ext3: ext3_symlink should use GFP_NOFS allocations inside (ver. 3)

Kirill Korotaev dev at sw.ru
Fri Mar 10 01:11:06 PST 2006


>>>Andrew,
>>>
>>>Fixed both comments from Al Viro (thanks, Al):
>>>- should have a separate helper
>>>- should pass 0 instead of GFP_KERNEL in page_symlink()
>>
>>> 
>>>+	page = find_or_create_page(mapping, 0,
>>>+			mapping_gfp_mask(mapping) | gfp_mask);
>>
>>
>>
>>this does not work; GFP_NOFS has a bit *LESS* than GFP_KERNEL, not a bit
>>more. As such a | operation isn't going to be useful....
>>
>>(So I think that while Al's intention was good, the implication of it
>>isn't ;)
> 
> 
> Yup.  page_symlink() needs to pass in mapping_gfp_mask(inode->i_mapping)
> and ext3 needs to pass in, umm,
> 
> 	mapping_gfp_mask(inode->i_mapping) & ~__GFP_FS
> 
> or
> 
> 	GFP_NOFS|__GFP_HIGHMEM.
> 
> preferably the former I guess.

This looks reasonable.
See the patch attached.

Thanks,
Kirill

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: diff-ext3-nofssymlink-20060210
URL: <http://lists.openvz.org/pipermail/devel/attachments/20060310/fc80ae63/attachment-0001.ksh>


More information about the Devel mailing list