Re: [PATCH v2 3/3] fs: add support for SquashFS 4.0

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Feb 16, 2016 at 09:38:03AM +0100, Yegor Yefremov wrote:
> On Tue, Feb 16, 2016 at 9:23 AM,  <yegorslists@xxxxxxxxxxxxxx> wrote:
> > From: Yegor Yefremov <yegorslists@xxxxxxxxxxxxxx>
> >
> > The driver was imported from Linux 4.4.
> >
> > Signed-off-by: Yegor Yefremov <yegorslists@xxxxxxxxxxxxxx>
> > ---
> > Changes:
> >         v2: - fix checkpatch errors
> >             - remove spinlock/wait code from cache implementation
> >             - fix directory listing
> >             - add documentation entry about SquashFS
> >             - fix compiling without XZ enabled
> >             - fix some memory leaks
> 
> Memory leaks:
> 
> 1. mount still produces 20 bytes, that I still haven't identified

Does this accumulate if you repeat mount/unmount? Usually when
allocating/freeing bunches of memory you don't have the exact amount of
memory free afterwards.

> 2. ls -l has about 300 bytes, how do I best handle qstr duplicating?
> Its name is *const char **. If I'm doing alloc() I'm breaking this
> qualifier.

Why do you alloc? In squashfs_readdir() you can do a
nm.name = dentry->d_name.name instead of doing an extra allocation for
the string.

> 3. reading a file, i.e. cat has no memory leak so far according to meminfo

\o/

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux