mirror of
https://github.com/torvalds/linux.git
synced 2024-11-27 22:51:35 +00:00
GFS2: Set GFP_NOFS when allocating page on write
We need to ensure that we always set GFP_NOFS in this one particular case when allocating pages for write. Reported-by: Fabio M. Di Nitto <fdinitto@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
This commit is contained in:
parent
ede6f5aea0
commit
e4fefbac6c
@ -675,6 +675,7 @@ static int gfs2_write_begin(struct file *file, struct address_space *mapping,
|
|||||||
goto out_trans_fail;
|
goto out_trans_fail;
|
||||||
|
|
||||||
error = -ENOMEM;
|
error = -ENOMEM;
|
||||||
|
flags |= AOP_FLAG_NOFS;
|
||||||
page = grab_cache_page_write_begin(mapping, index, flags);
|
page = grab_cache_page_write_begin(mapping, index, flags);
|
||||||
*pagep = page;
|
*pagep = page;
|
||||||
if (unlikely(!page))
|
if (unlikely(!page))
|
||||||
|
Loading…
Reference in New Issue
Block a user