diff options
author | jkar8572 <jkar8572> | 2005-03-31 13:49:41 +0000 |
---|---|---|
committer | jkar8572 <jkar8572> | 2005-03-31 13:49:41 +0000 |
commit | 73b8a3065ecc0ca69b507538406953da1ca3df72 (patch) | |
tree | dee20a1e445ef9371554b539c6185402be512c86 /quotaio_v2.c | |
parent | 48e25f93f40a71786df4598fc9ca038779cda979 (diff) | |
download | linuxquota-73b8a3065ecc0ca69b507538406953da1ca3df72.tar.gz |
Handle better when quota file in v2 format would become empty (Niu YaWei)
Diffstat (limited to 'quotaio_v2.c')
-rw-r--r-- | quotaio_v2.c | 3 |
1 files changed, 2 insertions, 1 deletions
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; } |