Commit 4aa25bcb authored by Julia Lawall's avatar Julia Lawall Committed by Tyler Hicks

ecryptfs: Eliminate useless code

The variable lower_dentry is initialized twice to the same (side effect-free)
expression.  Drop one initialization.

A simplified version of the semantic match that finds this problem is:
(http://coccinelle.lip6.fr/)

// <smpl>
@forall@
idexpression *x;
identifier f!=ERR_PTR;
@@

x = f(...)
... when != x
(
x = f(...,<+...x...+>,...)
|
* x = f(...)
)
// </smpl>
Signed-off-by: default avatarJulia Lawall <julia@diku.dk>
Signed-off-by: default avatarTyler Hicks <tyhicks@linux.vnet.ibm.com>
parent fe0fc013
...@@ -158,7 +158,7 @@ static int ecryptfs_open(struct inode *inode, struct file *file) ...@@ -158,7 +158,7 @@ static int ecryptfs_open(struct inode *inode, struct file *file)
struct dentry *ecryptfs_dentry = file->f_path.dentry; struct dentry *ecryptfs_dentry = file->f_path.dentry;
/* Private value of ecryptfs_dentry allocated in /* Private value of ecryptfs_dentry allocated in
* ecryptfs_lookup() */ * ecryptfs_lookup() */
struct dentry *lower_dentry = ecryptfs_dentry_to_lower(ecryptfs_dentry); struct dentry *lower_dentry;
struct ecryptfs_file_info *file_info; struct ecryptfs_file_info *file_info;
mount_crypt_stat = &ecryptfs_superblock_to_private( mount_crypt_stat = &ecryptfs_superblock_to_private(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment