diff options
author | Theodore Ts'o <tytso@mit.edu> | 2015-05-18 13:15:47 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2015-05-18 13:15:47 -0400 |
commit | d229959072eba40e1c2a4f53f8af17f1e770eb66 (patch) | |
tree | 1321587e2ae72863ac6f06d5ca7df6c809186937 /fs/ext4/dir.c | |
parent | 5b643f9ce34df945e58c7176275d406aa0db704f (diff) | |
download | op-kernel-dev-d229959072eba40e1c2a4f53f8af17f1e770eb66.zip op-kernel-dev-d229959072eba40e1c2a4f53f8af17f1e770eb66.tar.gz |
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 5665d82..d799d5d 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, |