diff options
Diffstat (limited to 'fs/ext4/dir.c')
-rw-r--r-- | fs/ext4/dir.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/ext4/dir.c b/fs/ext4/dir.c index 5665d82d2332..d799d5d571e9 100644 --- a/fs/ext4/dir.c +++ b/fs/ext4/dir.c @@ -247,9 +247,12 @@ static int ext4_readdir(struct file *file, struct dir_context *ctx) get_dtype(sb, de->file_type))) goto done; } else { + int save_len = fname_crypto_str.len; + /* Directory is encrypted */ err = ext4_fname_disk_to_usr(enc_ctx, NULL, de, &fname_crypto_str); + fname_crypto_str.len = save_len; if (err < 0) goto errout; if (!dir_emit(ctx, |