[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.02.1204280701210.1917@hadrien>
Date: Sat, 28 Apr 2012 07:06:16 +0200 (CEST)
From: Julia Lawall <julia.lawall@...6.fr>
To: dwmw2@...radead.org
cc: linux-mtd@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: question about fs/jffs2/readinode.c
The function read_direntry in fs/jffs2/readinode.c contains the following
code:
err = jffs2_flash_read(c, (ref_offset(ref)) + read,
rd->nsize - already, &read, &fd->name[already]);
if (unlikely(read != rd->nsize - already) && likely(!err))
return -EIO;
if (unlikely(err)) {
JFFS2_ERROR("read remainder of name: error %d\n", err);
jffs2_free_full_dirent(fd);
return -EIO;
}
Is it intentional that the first if doesn't free fd? At first I thought
that that might be the case, because what would be the point of having two
conditionals if they are going to do the same thing. But I can't see why
fd should not be freed either, so maybe the two conditionals are just
there to give different error messages?
thanks,
julia
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists