• Eric Biggers's avatar
    fscrypt: define fscrypt_fname_alloc_buffer() to be for presented names · 2cbadadc
    Eric Biggers authored
    Previously fscrypt_fname_alloc_buffer() was used to allocate buffers for
    both presented (decrypted or encoded) and encrypted filenames.  That was
    confusing, because it had to allocate the worst-case size for either,
    e.g. including NUL-padding even when it was meaningless.
    
    But now that fscrypt_setup_filename() no longer calls it, it is only
    used in the ->get_link() and ->readdir() paths, which specifically want
    a buffer for presented filenames.  Therefore, switch the behavior over
    to allocating the buffer for presented filenames only.
    Signed-off-by: default avatarEric Biggers <ebiggers@google.com>
    Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
    2cbadadc
fname.c 11.1 KB