X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=fs%2Fquota_v2.c;h=b4199ec3ece460bd9818c419b7b9ed1a10fab06f;hb=de862b488e81172d4c610945efd9f3fc7f4b84a7;hp=19bdb7b86ca77b436b63f8dc6f0dbf5493bc4b36;hpb=1da177e4c3f41524e886b7f1b8a0c1fc7321cac2;p=firefly-linux-kernel-4.4.55.git diff --git a/fs/quota_v2.c b/fs/quota_v2.c index 19bdb7b86ca7..b4199ec3ece4 100644 --- a/fs/quota_v2.c +++ b/fs/quota_v2.c @@ -35,7 +35,8 @@ static int v2_check_quota_file(struct super_block *sb, int type) size = sb->s_op->quota_read(sb, type, (char *)&dqhead, sizeof(struct v2_disk_dqheader), 0); if (size != sizeof(struct v2_disk_dqheader)) { - printk("failed read\n"); + printk("quota_v2: failed read expected=%zd got=%zd\n", + sizeof(struct v2_disk_dqheader), size); return 0; } if (le32_to_cpu(dqhead.dqh_magic) != quota_magics[type] || @@ -503,7 +504,8 @@ static int remove_tree(struct dquot *dquot, uint *blk, int depth) int i; ref[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(sb, type, buf, *blk); *blk = 0; }