]> git.baikalelectronics.ru Git - kernel.git/commit
ext2/3: use prandom_u32() instead of get_random_bytes()
authorZhangZhen <zhenzhang.zhang@huawei.com>
Wed, 26 Feb 2014 02:32:41 +0000 (10:32 +0800)
committerJan Kara <jack@suse.cz>
Tue, 4 Mar 2014 11:19:03 +0000 (12:19 +0100)
commit2aabe1a71e0fbab2c160b0a09d64e2b55775b57f
tree27eb1888379fd6e6a182ea0d01401140c9819ba4
parent5f5ba7dbbd1f5217c92ab3e50ed1fd6fc741376f
ext2/3: use prandom_u32() instead of get_random_bytes()

Many of the uses of get_random_bytes() do not actually need
cryptographically secure random numbers.  Replace those uses with a
call to prandom_u32(), which is faster and which doesn't consume
entropy from the /dev/random driver.

The commit b601c3a8e21f457d0c22113d6d161cf0d529d15c has made that for
ext4, and i did the same for ext2/3.

Signed-off-by: Zhang Zhen <zhenzhang.zhang@huawei.com>
Signed-off-by: Jan Kara <jack@suse.cz>
fs/ext2/ialloc.c
fs/ext3/ialloc.c