mirror of
git://git.9front.org/plan9front/plan9front
synced 2025-01-12 11:10:06 +00:00
gefs: fix error handling in readsnap()
This commit is contained in:
parent
d4938f099d
commit
0bfa3ffcb4
1 changed files with 5 additions and 3 deletions
|
@ -2026,7 +2026,7 @@ readsnap(Fmsg *m, Fid *f, Fcall *r)
|
|||
}
|
||||
if(s->donescan){
|
||||
r->count = 0;
|
||||
return;
|
||||
goto Out;
|
||||
}
|
||||
p = r->data;
|
||||
n = m->count;
|
||||
|
@ -2037,7 +2037,7 @@ readsnap(Fmsg *m, Fid *f, Fcall *r)
|
|||
d.qid.path = UNPACK64(s->kv.v + 1);
|
||||
if((ns = dir2statbuf(&d, p, n)) == -1){
|
||||
r->count = 0;
|
||||
return;
|
||||
goto Out;
|
||||
}
|
||||
s->overflow = 0;
|
||||
p += ns;
|
||||
|
@ -2058,9 +2058,11 @@ readsnap(Fmsg *m, Fid *f, Fcall *r)
|
|||
n -= ns;
|
||||
}
|
||||
btexit(s);
|
||||
r->count = p - r->data;
|
||||
|
||||
Out:
|
||||
poperror();
|
||||
wunlock(f);
|
||||
r->count = p - r->data;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue