diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2018-09-28 09:21:32 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2018-10-08 08:36:58 +0200 |
commit | d4b75d34fc40268535432ec65ae6d0ecb6551453 (patch) | |
tree | 6a5785bfb30940d3d79ddc13bc478a3433807a51 /fs/ubifs/ubifs.c | |
parent | 35197571a859dc268671341530c4e8606cebf901 (diff) | |
download | barebox-d4b75d34fc40268535432ec65ae6d0ecb6551453.tar.gz barebox-d4b75d34fc40268535432ec65ae6d0ecb6551453.tar.xz |
fs: ubifs: remove not needed code
This patch aggressively removes stuff that we do not need in a readonly
implementation:
- write buffering support
- lpt/ltab code
- garbage collector
- everything under #ifndef __BAREBOX__
This decreases the binary size by about 5k on ARM, but the main reason
for doing this is the idea that things that are not there don't need to
be synced with upstream ubifs code.
The __BAREBOX__ ifdeffery makes the code very hard to read and is a
maintenance burden by itself, so it is removed here aswell.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'fs/ubifs/ubifs.c')
-rw-r--r-- | fs/ubifs/ubifs.c | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/fs/ubifs/ubifs.c b/fs/ubifs/ubifs.c index 97cbe4991f..99612732dd 100644 --- a/fs/ubifs/ubifs.c +++ b/fs/ubifs/ubifs.c @@ -56,9 +56,6 @@ static struct ubifs_compressor none_compr = { static struct ubifs_compressor lzo_compr = { .compr_type = UBIFS_COMPR_LZO, -#ifndef __BAREBOX__ - .comp_mutex = &lzo_mutex, -#endif .name = "lzo", #ifdef CONFIG_LZO_DECOMPRESS .capi_name = "lzo", @@ -68,10 +65,6 @@ static struct ubifs_compressor lzo_compr = { static struct ubifs_compressor zlib_compr = { .compr_type = UBIFS_COMPR_ZLIB, -#ifndef __BAREBOX__ - .comp_mutex = &deflate_mutex, - .decomp_mutex = &inflate_mutex, -#endif .name = "zlib", #ifdef CONFIG_ZLIB .capi_name = "deflate", @@ -83,7 +76,6 @@ static struct ubifs_compressor zlib_compr = { struct ubifs_compressor *ubifs_compressors[UBIFS_COMPR_TYPES_CNT]; -#ifdef __BAREBOX__ /* from mm/util.c */ struct crypto_comp { @@ -146,7 +138,6 @@ crypto_comp_decompress(const struct ubifs_info *c, struct crypto_comp *tfm, /* Global clean znode counter (for all mounted UBIFS instances) */ atomic_long_t ubifs_clean_zn_cnt; -#endif /** * ubifs_decompress - decompress data. @@ -254,11 +245,6 @@ int __init ubifs_compressors_init(void) /* file.c */ -static inline void *kmap(struct page *page) -{ - return page->addr; -} - static int read_block(struct inode *inode, void *addr, unsigned int block, struct ubifs_data_node *dn) { |