diff options
author | Matthew Wilcox <willy@linux.intel.com> | 2013-06-15 13:55:59 +0200 |
---|---|---|
committer | Tyler Hicks <tyhicks@canonical.com> | 2013-07-10 08:40:28 +0200 |
commit | cc18ec3c8f5dd735c1bff5da30fd33860c08a293 (patch) | |
tree | 50fdd52cf70d0b611a24f42226cdca8467be6f10 /fs/ecryptfs/main.c | |
parent | eCryptfs: Make extent and scatterlist crypt function parameters similar (diff) | |
download | linux-cc18ec3c8f5dd735c1bff5da30fd33860c08a293.tar.xz linux-cc18ec3c8f5dd735c1bff5da30fd33860c08a293.zip |
Use ecryptfs_dentry_to_lower_path in a couple of places
There are two places in ecryptfs that benefit from using
ecryptfs_dentry_to_lower_path() instead of separate calls to
ecryptfs_dentry_to_lower() and ecryptfs_dentry_to_lower_mnt(). Both
sites use fewer instructions and less stack (determined by examining
objdump output).
Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Diffstat (limited to 'fs/ecryptfs/main.c')
-rw-r--r-- | fs/ecryptfs/main.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/ecryptfs/main.c b/fs/ecryptfs/main.c index e924cf45aad9..eb1c5979ecaf 100644 --- a/fs/ecryptfs/main.c +++ b/fs/ecryptfs/main.c @@ -120,16 +120,15 @@ static int ecryptfs_init_lower_file(struct dentry *dentry, struct file **lower_file) { const struct cred *cred = current_cred(); - struct dentry *lower_dentry = ecryptfs_dentry_to_lower(dentry); - struct vfsmount *lower_mnt = ecryptfs_dentry_to_lower_mnt(dentry); + struct path *path = ecryptfs_dentry_to_lower_path(dentry); int rc; - rc = ecryptfs_privileged_open(lower_file, lower_dentry, lower_mnt, + rc = ecryptfs_privileged_open(lower_file, path->dentry, path->mnt, cred); if (rc) { printk(KERN_ERR "Error opening lower file " "for lower_dentry [0x%p] and lower_mnt [0x%p]; " - "rc = [%d]\n", lower_dentry, lower_mnt, rc); + "rc = [%d]\n", path->dentry, path->mnt, rc); (*lower_file) = NULL; } return rc; |