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/tnc_misc.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/tnc_misc.c')
-rw-r--r-- | fs/ubifs/tnc_misc.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/fs/ubifs/tnc_misc.c b/fs/ubifs/tnc_misc.c index 21da709bac..1619d08be8 100644 --- a/fs/ubifs/tnc_misc.c +++ b/fs/ubifs/tnc_misc.c @@ -16,9 +16,7 @@ * putting it all in one file would make that file too big and unreadable. */ -#ifdef __BAREBOX__ #include <linux/err.h> -#endif #include "ubifs.h" /** @@ -452,19 +450,9 @@ int ubifs_tnc_read_node(struct ubifs_info *c, struct ubifs_zbranch *zbr, { union ubifs_key key1, *key = &zbr->key; int err, type = key_type(c, key); - struct ubifs_wbuf *wbuf; - /* - * 'zbr' has to point to on-flash node. The node may sit in a bud and - * may even be in a write buffer, so we have to take care about this. - */ - wbuf = ubifs_get_wbuf(c, zbr->lnum); - if (wbuf) - err = ubifs_read_node_wbuf(wbuf, node, type, zbr->len, - zbr->lnum, zbr->offs); - else - err = ubifs_read_node(c, node, type, zbr->len, zbr->lnum, - zbr->offs); + err = ubifs_read_node(c, node, type, zbr->len, zbr->lnum, + zbr->offs); if (err) { dbg_tnck(key, "key "); |