Fix missing ret assignment in __bio_map_user() error path
commitdec0370af02c080b1a9c240058a9887fc53a5f08
authorJens Axboe <axboe@suse.de>
Fri, 11 Aug 2006 20:29:11 +0000 (11 22:29 +0200)
committerAdrian Bunk <bunk@stusta.de>
Fri, 11 Aug 2006 20:29:11 +0000 (11 22:29 +0200)
tree5010837f0a234d091fc28e693e5c1d20e320cf87
parent296b3f9ee6e8176e54229ef1d357b4e044c01fb2
Fix missing ret assignment in __bio_map_user() error path

If get_user_pages() returns less pages than what we asked for, we
jump to out_unmap which will return ERR_PTR(ret). But ret can contain
a positive number just smaller than local_nr_pages, so be sure to set
it to -EFAULT always.

Problem found and diagnosed by Damien Le Moal <damien@sdl.hitachi.co.jp>

Signed-off-by: Jens Axboe <axboe@suse.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
fs/bio.c