projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9c33925
)
fs/direct-io.c: remove redundant comparison
author
Gu Zheng
<
[email protected]
>
Thu, 3 Apr 2014 21:47:16 +0000
(14:47 -0700)
committer
Linus Torvalds
<
[email protected]
>
Thu, 3 Apr 2014 23:20:57 +0000
(16:20 -0700)
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 <
[email protected]
>
Cc: Al Viro <
[email protected]
>
Reviewed-by: Jeff Moyer <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
fs/direct-io.c
patch
|
blob
|
history
diff --git
a/fs/direct-io.c
b/fs/direct-io.c
index 160a5489a93936372c85683ee8cfd6da5185007b..6e6bff3752446036990fb4a5d0eca4cdaad3fac5 100644
(file)
--- 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;