Commit 27e47a63 authored by Eric Biggers's avatar Eric Biggers Committed by Theodore Ts'o

fscrypt: inline fscrypt_free_filename()

fscrypt_free_filename() only needs to do a kfree() of,
which works well as an inline function.  We can skip setting the various
pointers to NULL, since no user cares about it (the name is always freed
just before it goes out of scope).
Signed-off-by: default avatarEric Biggers <>
Reviewed-by: David Gstir's avatarDavid Gstir <>
Signed-off-by: default avatarTheodore Ts'o <>
parent 3c2993b8
......@@ -453,12 +453,3 @@ int fscrypt_setup_filename(struct inode *dir, const struct qstr *iname,
return ret;
void fscrypt_free_filename(struct fscrypt_name *fname)
fname-> = NULL;
fname->usr_fname = NULL;
fname-> = NULL;
......@@ -47,7 +47,12 @@ extern void fscrypt_put_encryption_info(struct inode *, struct fscrypt_info *);
/* fname.c */
extern int fscrypt_setup_filename(struct inode *, const struct qstr *,
int lookup, struct fscrypt_name *);
extern void fscrypt_free_filename(struct fscrypt_name *);
static inline void fscrypt_free_filename(struct fscrypt_name *fname)
extern u32 fscrypt_fname_encrypted_size(const struct inode *, u32);
extern int fscrypt_fname_alloc_buffer(const struct inode *, u32,
struct fscrypt_str *);
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment