diff --git a/fs/ext4/file.c b/fs/ext4/file.c index 257118d4d078c111d8953559b8d797db531a41a0..edba9fb9bb0d58190f377ab5e4c78774c90ef86d 100644 --- a/fs/ext4/file.c +++ b/fs/ext4/file.c @@ -374,7 +374,7 @@ static int ext4_file_open(struct inode * inode, struct file * filp) return -ENOKEY; } - dir = dget_parent(filp->f_path.dentry); + dir = dget_parent(file_dentry(filp)); if (ext4_encrypted_inode(d_inode(dir)) && !ext4_is_child_context_consistent_with_parent(d_inode(dir), inode)) { ext4_warning(inode->i_sb,