Skip to content

Commit 4aa25bc

Browse files
Julia LawallTyler Hicks
authored andcommitted
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: Julia Lawall <julia@diku.dk> Signed-off-by: Tyler Hicks <tyhicks@linux.vnet.ibm.com>
1 parent fe0fc01 commit 4aa25bc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎fs/ecryptfs/file.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ static int ecryptfs_open(struct inode *inode, struct file *file)
158158
struct dentry *ecryptfs_dentry = file->f_path.dentry;
159159
/* Private value of ecryptfs_dentry allocated in
160160
* ecryptfs_lookup() */
161-
struct dentry *lower_dentry = ecryptfs_dentry_to_lower(ecryptfs_dentry);
161+
struct dentry *lower_dentry;
162162
struct ecryptfs_file_info *file_info;
163163

164164
mount_crypt_stat = &ecryptfs_superblock_to_private(

0 commit comments

Comments
 (0)