summaryrefslogtreecommitdiffstats
path: root/fs/ext4/symlink.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ext4/symlink.c')
-rw-r--r--fs/ext4/symlink.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/ext4/symlink.c b/fs/ext4/symlink.c
index 136ca0e..19f78f2 100644
--- a/fs/ext4/symlink.c
+++ b/fs/ext4/symlink.c
@@ -28,7 +28,7 @@ static void *ext4_follow_link(struct dentry *dentry, struct nameidata *nd)
struct page *cpage = NULL;
char *caddr, *paddr = NULL;
struct ext4_str cstr, pstr;
- struct inode *inode = dentry->d_inode;
+ struct inode *inode = d_inode(dentry);
struct ext4_fname_crypto_ctx *ctx = NULL;
struct ext4_encrypted_symlink_data *sd;
loff_t size = min_t(loff_t, i_size_read(inode), PAGE_SIZE - 1);
@@ -43,8 +43,8 @@ static void *ext4_follow_link(struct dentry *dentry, struct nameidata *nd)
return ctx;
if (ext4_inode_is_fast_symlink(inode)) {
- caddr = (char *) EXT4_I(dentry->d_inode)->i_data;
- max_size = sizeof(EXT4_I(dentry->d_inode)->i_data);
+ caddr = (char *) EXT4_I(inode)->i_data;
+ max_size = sizeof(EXT4_I(inode)->i_data);
} else {
cpage = read_mapping_page(inode->i_mapping, 0, NULL);
if (IS_ERR(cpage)) {
@@ -113,7 +113,7 @@ static void ext4_put_link(struct dentry *dentry, struct nameidata *nd,
static void *ext4_follow_fast_link(struct dentry *dentry, struct nameidata *nd)
{
- struct ext4_inode_info *ei = EXT4_I(dentry->d_inode);
+ struct ext4_inode_info *ei = EXT4_I(d_inode(dentry));
nd_set_link(nd, (char *) ei->i_data);
return NULL;
}
OpenPOWER on IntegriCloud