]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
libquota: fix get_dq()
authorNiu Yawei <niu@whamcloud.com>
Mon, 14 Nov 2011 16:36:12 +0000 (11:36 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 14 Nov 2011 16:36:12 +0000 (11:36 -0500)
The dq_id should be set on newly created dqout.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
lib/quota/mkquota.c

index 832b135e6652b85171ac25f204a128a908a1f1a5..ac7288cae57a6b442df0ad4c29742f4571ae1a2a 100644 (file)
@@ -292,6 +292,7 @@ static struct dquot *get_dq(dict_t *dict, __u32 key)
                }
                memset(dq, 0, sizeof(struct dquot));
                dict_alloc_insert(dict, UINT_TO_VOIDPTR(key), dq);
+               dq->dq_id = key;
        }
        return dq;
 }