diff options
-rw-r--r-- | Changelog | 1 | ||||
-rw-r--r-- | quotaio_v2.c | 3 |
2 files changed, 3 insertions, 1 deletions
@@ -1,4 +1,5 @@ Changes in quota-tools from 3.12 to 3.13 +* handle better when quota file should become empty (Niu YaWei) * minor manpage and help-text fixes (Jan Kara) * fixed quotacheck(8) to check each block only once (Jan Kara) * fixed quotacheck(8) messages about corrupted blocks (Jan Kara) diff --git a/quotaio_v2.c b/quotaio_v2.c index 5176435..d947839 100644 --- a/quotaio_v2.c +++ b/quotaio_v2.c @@ -545,7 +545,8 @@ static void remove_tree(struct quota_handle *h, struct dquot *dquot, uint * blk, ref[V2_GETIDINDEX(dquot->dq_id, depth)] = __cpu_to_le32(0); for (i = 0; i < V2_DQBLKSIZE && !buf[i]; i++); /* Block got empty? */ - if (i == V2_DQBLKSIZE) { + /* Don't put the root block into the free block list */ + if (i == V2_DQBLKSIZE && *blk != V2_DQTREEOFF) { put_free_dqblk(h, buf, *blk); *blk = 0; } |