]> git.baikalelectronics.ru Git - kernel.git/commit
eCryptfs: Cleanup and optimize ecryptfs_lookup_interpose()
authorTyler Hicks <tyhicks@linux.vnet.ibm.com>
Tue, 24 May 2011 09:56:23 +0000 (04:56 -0500)
committerTyler Hicks <tyhicks@linux.vnet.ibm.com>
Sun, 29 May 2011 19:24:24 +0000 (14:24 -0500)
commitff8348b2f17e39c453d664d979fd5463e7099080
tree6651d8a2356b9075e6978285cbcfa7aab16e9b7a
parent1f65bc6ac532604f587cc08011c7e6e896d26b8f
eCryptfs: Cleanup and optimize ecryptfs_lookup_interpose()

ecryptfs_lookup_interpose() has turned into spaghetti code over the
years. This is an effort to clean it up.

 - Shorten overly descriptive variable names such as ecryptfs_dentry
 - Simplify gotos and error paths
 - Create helper function for reading plaintext i_size from metadata

It also includes an optimization when reading i_size from the metadata.
A complete page-sized kmem_cache_alloc() was being done to read in 16
bytes of metadata. The buffer for that is now statically declared.

Signed-off-by: Tyler Hicks <tyhicks@linux.vnet.ibm.com>
fs/ecryptfs/crypto.c
fs/ecryptfs/ecryptfs_kernel.h
fs/ecryptfs/inode.c