author | Alberto Bertogli
<albertito@blitiri.com.ar> 2009-02-22 06:20:25 UTC |
committer | Alberto Bertogli
<albertito@blitiri.com.ar> 2009-02-22 06:24:44 UTC |
parent | 38e3f986fc53eaae2c9b5b617c52965d30c7e35e |
trans.c | +5 | -4 |
diff --git a/trans.c b/trans.c index 1effe16..df340d6 100644 --- a/trans.c +++ b/trans.c @@ -68,12 +68,13 @@ static void free_tid(struct jfs *fs, unsigned int tid) if (tid == curid) { /* look up the new max. */ for (i = curid - 1; i > 0; i--) { - /* this can fail if we're low on mem, but we don't - * care checking here because the problem will come - * out later and we can fail more properly */ get_jtfile(fs, i, name); if (access(name, R_OK | W_OK) == 0) { - curid = i; + break; + } else if (errno != EACCES) { + /* Real error, stop looking for a new max. It + * doesn't hurt us because it's ok if the max + * is higher than it could be */ break; } }