Merge branches 'acpi-resources', 'acpi-battery', 'acpi-doc' and 'acpi-pnp'
[linux-2.6-block.git] / fs / ext4 / symlink.c
index 136ca0e911fd71efa681746c72da1a99cae1d949..187b789203142d6b444b264acd44798427626b41 100644 (file)
@@ -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)) {
@@ -74,7 +74,7 @@ static void *ext4_follow_link(struct dentry *dentry, struct nameidata *nd)
                goto errout;
        }
        pstr.name = paddr;
-       res = _ext4_fname_disk_to_usr(ctx, &cstr, &pstr);
+       res = _ext4_fname_disk_to_usr(ctx, NULL, &cstr, &pstr);
        if (res < 0)
                goto errout;
        /* Null-terminate the name */
@@ -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;
 }