Use xmmap_gently instead of xmmap in use_pack
use_pack has its own error message on mmap error, but it can't be reached when using xmmap, which dies with its own error. Signed-off-by: Mike Hommey <mh@glandium.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
8b3554279c
commit
3203566a71
@ -630,7 +630,7 @@ unsigned char *use_pack(struct packed_git *p,
|
|||||||
while (packed_git_limit < pack_mapped
|
while (packed_git_limit < pack_mapped
|
||||||
&& unuse_one_window(p))
|
&& unuse_one_window(p))
|
||||||
; /* nothing */
|
; /* nothing */
|
||||||
win->base = xmmap(NULL, win->len,
|
win->base = xmmap_gently(NULL, win->len,
|
||||||
PROT_READ, MAP_PRIVATE,
|
PROT_READ, MAP_PRIVATE,
|
||||||
p->pack_fd, win->offset);
|
p->pack_fd, win->offset);
|
||||||
if (win->base == MAP_FAILED)
|
if (win->base == MAP_FAILED)
|
||||||
|
Reference in New Issue
Block a user