f2fs: avoid allocating failure in bio_alloc
authorChao Yu <chao2.yu@samsung.com>
Sun, 22 Sep 2013 07:50:50 +0000 (15:50 +0800)
committerJaegeuk Kim <jaegeuk.kim@samsung.com>
Tue, 24 Sep 2013 08:45:48 +0000 (17:45 +0900)
commitcc7b1bb173676621b092b61d22d8d12b05efb5e8
tree440612ad80fa325aa3a5b316b5f25d87ff6a0f81
parenta57e564d14d9d123b2dd4ff1c933da0d900e0b1d
f2fs: avoid allocating failure in bio_alloc

This patch add macro MAX_BIO_BLOCKS to limit value of npages in
f2fs_bio_alloc, it can avoid allocating failure in bio_alloc caused by
npages is larger than BIO_MAX_PAGES.

Signed-off-by: Yu Chao <chao2.yu@samsung.com>
Reviewed-by: Gu Zheng <guz.fnst@cn.fujitsu.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
fs/f2fs/segment.c
fs/f2fs/segment.h