aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jffs2/compr.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/jffs2/compr.c')
-rw-r--r--fs/jffs2/compr.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/fs/jffs2/compr.c b/fs/jffs2/compr.c
index de4247021d25..97bc74db2c96 100644
--- a/fs/jffs2/compr.c
+++ b/fs/jffs2/compr.c
@@ -76,13 +76,18 @@ uint16_t jffs2_compress(struct jffs2_sb_info *c, struct jffs2_inode_info *f,
76 uint32_t *datalen, uint32_t *cdatalen) 76 uint32_t *datalen, uint32_t *cdatalen)
77{ 77{
78 int ret = JFFS2_COMPR_NONE; 78 int ret = JFFS2_COMPR_NONE;
79 int compr_ret; 79 int mode, compr_ret;
80 struct jffs2_compressor *this, *best=NULL; 80 struct jffs2_compressor *this, *best=NULL;
81 unsigned char *output_buf = NULL, *tmp_buf; 81 unsigned char *output_buf = NULL, *tmp_buf;
82 uint32_t orig_slen, orig_dlen; 82 uint32_t orig_slen, orig_dlen;
83 uint32_t best_slen=0, best_dlen=0; 83 uint32_t best_slen=0, best_dlen=0;
84 84
85 switch (jffs2_compression_mode) { 85 if (c->mount_opts.override_compr)
86 mode = c->mount_opts.compr;
87 else
88 mode = jffs2_compression_mode;
89
90 switch (mode) {
86 case JFFS2_COMPR_MODE_NONE: 91 case JFFS2_COMPR_MODE_NONE:
87 break; 92 break;
88 case JFFS2_COMPR_MODE_PRIORITY: 93 case JFFS2_COMPR_MODE_PRIORITY: