]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: don't overflow quota ID when initializing dqblk
authorEric Sandeen <sandeen@redhat.com>
Mon, 8 Feb 2016 00:22:58 +0000 (11:22 +1100)
committerDave Chinner <david@fromorbit.com>
Mon, 8 Feb 2016 00:22:58 +0000 (11:22 +1100)
commit52e385c09eb70eb619f9216705402f907c761707
tree46d5bc1493c4456f6b0231f0779b03369cf779d4
parentf25e915d4554cbe378d8ccb5ec057bac31fd3f67
xfs: don't overflow quota ID when initializing dqblk

Quota IDs are unsigned, and so we can pass in values up
to 2^32-1.  But if we try to initialize a block containing
values over MAX_INT, curid will overflow and assert.

curid holds a quota ID, so give it the proper
xfs_dqid_t type (and remove the now-impossible ASSERT).

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
fs/xfs/xfs_dquot.c