summaryrefslogtreecommitdiffstats
path: root/fs/direct-io.c
diff options
context:
space:
mode:
authorGu Zheng <guz.fnst@cn.fujitsu.com>2014-04-03 23:47:16 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2014-04-04 01:20:57 +0200
commit2b665e276c15ba7d9fc8cdd16931883a51ed13e4 (patch)
tree69853d98f18d80cb04dc20c74d1e0e37d6c1a162 /fs/direct-io.c
parentocfs2: pass "new" parameter to ocfs2_init_xattr_bucket (diff)
downloadlinux-2b665e276c15ba7d9fc8cdd16931883a51ed13e4.tar.xz
linux-2b665e276c15ba7d9fc8cdd16931883a51ed13e4.zip
fs/direct-io.c: remove redundant comparison
The return value of bio_get_nr_vecs() cannot be bigger than BIO_MAX_PAGES, so we can remove redundant the comparison between nr_pages and BIO_MAX_PAGES. Signed-off-by: Gu Zheng <guz.fnst@cn.fujitsu.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Reviewed-by: Jeff Moyer <jmoyer@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/direct-io.c')
-rw-r--r--fs/direct-io.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/fs/direct-io.c b/fs/direct-io.c
index 160a5489a939..6e6bff375244 100644
--- a/fs/direct-io.c
+++ b/fs/direct-io.c
@@ -664,7 +664,6 @@ static inline int dio_new_bio(struct dio *dio, struct dio_submit *sdio,
goto out;
sector = start_sector << (sdio->blkbits - 9);
nr_pages = min(sdio->pages_in_io, bio_get_nr_vecs(map_bh->b_bdev));
- nr_pages = min(nr_pages, BIO_MAX_PAGES);
BUG_ON(nr_pages <= 0);
dio_bio_alloc(dio, sdio, map_bh->b_bdev, sector, nr_pages);
sdio->boundary = 0;