Messages in this thread Patch in this message | | | Date | Sun, 16 May 2004 00:04:01 -0700 | From | Andrew Morton <> | Subject | Re: [PATCH] Quota fix 2 |
| |
Jan Kara <jack@ucw.cz> wrote: > > another fix for quota code - it fixes the problem with recursion into > filesystem when inode of quota file needs a page + some other allocation > problems.
It makes sense.
> I hope I got the GFP mask setting right..
nope! Here's a fix against your patch.
---
25-akpm/fs/dquot.c | 11 ++++++++++- 1 files changed, 10 insertions(+), 1 deletion(-)
diff -puN fs/dquot.c~quota-recursion-fix-fix fs/dquot.c --- 25/fs/dquot.c~quota-recursion-fix-fix 2004-05-15 23:58:31.365278768 -0700 +++ 25-akpm/fs/dquot.c 2004-05-16 00:02:52.667554784 -0700 @@ -1372,7 +1372,16 @@ static int vfs_quota_on_file(struct file * into filesystem when allocating page for quota inode */ down_write(&dqopt->dqptr_sem); inode->i_flags |= S_NOQUOTA | S_NOATIME; - clear_bit(ffs(__GFP_FS), &inode->i_mapping->flags); + + /* + * We write to quota files deep within filesystem code. We don't want + * the VFS to reenter filesystem code when it tries to allocate a + * pagecache page for the quota file write. So clear __GFP_FS in + * the quota file's allocation flags. + */ + mapping_set_gfp_mask(inode->i_mapping, + mapping_gfp_mask(inode->i_mapping) & ~__GFP_FS); + for (cnt = 0; cnt < MAXQUOTAS; cnt++) { to_drop[cnt] = inode->i_dquot[cnt]; inode->i_dquot[cnt] = NODQUOT; _
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |