diff options
author | Theodore Ts'o <tytso@mit.edu> | 2015-05-18 19:15:47 +0200 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2015-05-18 19:15:47 +0200 |
commit | d229959072eba40e1c2a4f53f8af17f1e770eb66 (patch) | |
tree | 1321587e2ae72863ac6f06d5ca7df6c809186937 /fs/ext4/dir.c | |
parent | ext4 crypto: optimize filename encryption (diff) | |
download | linux-d229959072eba40e1c2a4f53f8af17f1e770eb66.tar.xz linux-d229959072eba40e1c2a4f53f8af17f1e770eb66.zip |
ext4 crypto: don't allocate a page when encrypting/decrypting file names
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
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, |