Re: [PATCH v4 15/46] btrfs: handle nokey names.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Dec 01, 2023 at 05:11:12PM -0500, Josef Bacik wrote:
> +/*
> + * From a given location in a leaf, read a name into a qstr (usually a
> + * fscrypt_name's disk_name), allocating the required buffer. Used for
> + * nokey names.
> + */
> +int btrfs_fscrypt_get_disk_name(struct extent_buffer *leaf,
> +				struct btrfs_dir_item *dir_item,
> +				struct fscrypt_str *name)
> +{
> +	unsigned long de_name_len = btrfs_dir_name_len(leaf, dir_item);
> +	unsigned long de_name = (unsigned long)(dir_item + 1);
> +	/*
> +	 * For no-key names, we use this opportunity to find the disk
> +	 * name, so future searches don't need to deal with nokey names
> +	 * and we know what the encrypted size is.
> +	 */
> +	name->name = kmalloc(de_name_len, GFP_NOFS);
> +
> +	if (!name->name)
> +		return -ENOMEM;

Where is the kfree() that matches the above kmalloc()?

- Eric




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux