diff options
author | Raphael S. Carvalho <raphael.scarv@gmail.com> | 2014-02-05 17:21:37 -0500 |
---|---|---|
committer | Gene Cumm <gene.cumm@gmail.com> | 2014-04-03 13:35:06 -0400 |
commit | 2bf0922e80b35c79fcc56318e71b1da29f55df0c (patch) | |
tree | abc13efcab93da3858d1545cde43dd7b69a3497f /core/include/fs.h | |
parent | c9ec0d59759721ba363a16f1af1b639aa57527b5 (diff) | |
download | syslinux-2bf0922e80b35c79fcc56318e71b1da29f55df0c.tar.gz |
core: Avoid initializing the cache more than once
Most of file system drivers initialize the cache themselves.
The problem is that the same cache could be again initialized later,
then invalidating the previous one. This patch fixes this.
Problem found while auditing the code.
Signed-off-by: Raphael S. Carvalho <raphael.scarv@gmail.com>
Diffstat (limited to 'core/include/fs.h')
-rw-r--r-- | core/include/fs.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/core/include/fs.h b/core/include/fs.h index 22fd6bff..ba7d6742 100644 --- a/core/include/fs.h +++ b/core/include/fs.h @@ -133,6 +133,7 @@ struct device { struct disk *disk; /* the cache stuff */ + uint8_t cache_init; /* cache initialized state */ char *cache_data; struct cache *cache_head; uint16_t cache_block_size; |