From 45dc63e7d8412546567399b94caeb683af58843e Mon Sep 17 00:00:00 2001 From: Dmitry Monakhov Date: Thu, 20 Oct 2011 20:07:23 -0400 Subject: [PATCH] ext4: Allow quota file use root reservation Quota file is fs's metadata, so it is reasonable to permit use root resevation if necessary. This patch fix 265'th xfstest failure Signed-off-by: Dmitry Monakhov Signed-off-by: "Theodore Ts'o" --- fs/ext4/mballoc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c index 8c005c028203..cd70b3041185 100644 --- a/fs/ext4/mballoc.c +++ b/fs/ext4/mballoc.c @@ -4291,6 +4291,10 @@ ext4_fsblk_t ext4_mb_new_blocks(handle_t *handle, trace_ext4_request_blocks(ar); + /* Allow to use superuser reservation for quota file */ + if (IS_NOQUOTA(ar->inode)) + ar->flags |= EXT4_MB_USE_ROOT_BLOCKS; + /* * For delayed allocation, we could skip the ENOSPC and * EDQUOT check, as blocks and quotas have been already -- 2.39.2