diff options
Diffstat (limited to 'fs/ext4/namei.c')
-rw-r--r-- | fs/ext4/namei.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c index 28fe71a2904c..e086eebe335e 100644 --- a/fs/ext4/namei.c +++ b/fs/ext4/namei.c | |||
@@ -1429,7 +1429,7 @@ struct dentry *ext4_get_parent(struct dentry *child) | |||
1429 | struct ext4_dir_entry_2 * de; | 1429 | struct ext4_dir_entry_2 * de; |
1430 | struct buffer_head *bh; | 1430 | struct buffer_head *bh; |
1431 | 1431 | ||
1432 | bh = ext4_find_entry(child->d_inode, &dotdot, &de, NULL); | 1432 | bh = ext4_find_entry(d_inode(child), &dotdot, &de, NULL); |
1433 | if (IS_ERR(bh)) | 1433 | if (IS_ERR(bh)) |
1434 | return (struct dentry *) bh; | 1434 | return (struct dentry *) bh; |
1435 | if (!bh) | 1435 | if (!bh) |
@@ -1437,13 +1437,13 @@ struct dentry *ext4_get_parent(struct dentry *child) | |||
1437 | ino = le32_to_cpu(de->inode); | 1437 | ino = le32_to_cpu(de->inode); |
1438 | brelse(bh); | 1438 | brelse(bh); |
1439 | 1439 | ||
1440 | if (!ext4_valid_inum(child->d_inode->i_sb, ino)) { | 1440 | if (!ext4_valid_inum(d_inode(child)->i_sb, ino)) { |
1441 | EXT4_ERROR_INODE(child->d_inode, | 1441 | EXT4_ERROR_INODE(d_inode(child), |
1442 | "bad parent inode number: %u", ino); | 1442 | "bad parent inode number: %u", ino); |
1443 | return ERR_PTR(-EIO); | 1443 | return ERR_PTR(-EIO); |
1444 | } | 1444 | } |
1445 | 1445 | ||
1446 | return d_obtain_alias(ext4_iget_normal(child->d_inode->i_sb, ino)); | 1446 | return d_obtain_alias(ext4_iget_normal(d_inode(child)->i_sb, ino)); |
1447 | } | 1447 | } |
1448 | 1448 | ||
1449 | /* | 1449 | /* |
@@ -1676,7 +1676,7 @@ static int add_dirent_to_buf(handle_t *handle, struct dentry *dentry, | |||
1676 | struct inode *inode, struct ext4_dir_entry_2 *de, | 1676 | struct inode *inode, struct ext4_dir_entry_2 *de, |
1677 | struct buffer_head *bh) | 1677 | struct buffer_head *bh) |
1678 | { | 1678 | { |
1679 | struct inode *dir = dentry->d_parent->d_inode; | 1679 | struct inode *dir = d_inode(dentry->d_parent); |
1680 | const char *name = dentry->d_name.name; | 1680 | const char *name = dentry->d_name.name; |
1681 | int namelen = dentry->d_name.len; | 1681 | int namelen = dentry->d_name.len; |
1682 | unsigned int blocksize = dir->i_sb->s_blocksize; | 1682 | unsigned int blocksize = dir->i_sb->s_blocksize; |
@@ -1732,7 +1732,7 @@ static int add_dirent_to_buf(handle_t *handle, struct dentry *dentry, | |||
1732 | static int make_indexed_dir(handle_t *handle, struct dentry *dentry, | 1732 | static int make_indexed_dir(handle_t *handle, struct dentry *dentry, |
1733 | struct inode *inode, struct buffer_head *bh) | 1733 | struct inode *inode, struct buffer_head *bh) |
1734 | { | 1734 | { |
1735 | struct inode *dir = dentry->d_parent->d_inode; | 1735 | struct inode *dir = d_inode(dentry->d_parent); |
1736 | const char *name = dentry->d_name.name; | 1736 | const char *name = dentry->d_name.name; |
1737 | int namelen = dentry->d_name.len; | 1737 | int namelen = dentry->d_name.len; |
1738 | struct buffer_head *bh2; | 1738 | struct buffer_head *bh2; |
@@ -1864,7 +1864,7 @@ out_frames: | |||
1864 | static int ext4_add_entry(handle_t *handle, struct dentry *dentry, | 1864 | static int ext4_add_entry(handle_t *handle, struct dentry *dentry, |
1865 | struct inode *inode) | 1865 | struct inode *inode) |
1866 | { | 1866 | { |
1867 | struct inode *dir = dentry->d_parent->d_inode; | 1867 | struct inode *dir = d_inode(dentry->d_parent); |
1868 | struct buffer_head *bh; | 1868 | struct buffer_head *bh; |
1869 | struct ext4_dir_entry_2 *de; | 1869 | struct ext4_dir_entry_2 *de; |
1870 | struct ext4_dir_entry_tail *t; | 1870 | struct ext4_dir_entry_tail *t; |
@@ -1947,7 +1947,7 @@ static int ext4_dx_add_entry(handle_t *handle, struct dentry *dentry, | |||
1947 | struct dx_entry *entries, *at; | 1947 | struct dx_entry *entries, *at; |
1948 | struct dx_hash_info hinfo; | 1948 | struct dx_hash_info hinfo; |
1949 | struct buffer_head *bh; | 1949 | struct buffer_head *bh; |
1950 | struct inode *dir = dentry->d_parent->d_inode; | 1950 | struct inode *dir = d_inode(dentry->d_parent); |
1951 | struct super_block *sb = dir->i_sb; | 1951 | struct super_block *sb = dir->i_sb; |
1952 | struct ext4_dir_entry_2 *de; | 1952 | struct ext4_dir_entry_2 *de; |
1953 | int err; | 1953 | int err; |
@@ -2708,7 +2708,7 @@ static int ext4_rmdir(struct inode *dir, struct dentry *dentry) | |||
2708 | /* Initialize quotas before so that eventual writes go in | 2708 | /* Initialize quotas before so that eventual writes go in |
2709 | * separate transaction */ | 2709 | * separate transaction */ |
2710 | dquot_initialize(dir); | 2710 | dquot_initialize(dir); |
2711 | dquot_initialize(dentry->d_inode); | 2711 | dquot_initialize(d_inode(dentry)); |
2712 | 2712 | ||
2713 | retval = -ENOENT; | 2713 | retval = -ENOENT; |
2714 | bh = ext4_find_entry(dir, &dentry->d_name, &de, NULL); | 2714 | bh = ext4_find_entry(dir, &dentry->d_name, &de, NULL); |
@@ -2717,7 +2717,7 @@ static int ext4_rmdir(struct inode *dir, struct dentry *dentry) | |||
2717 | if (!bh) | 2717 | if (!bh) |
2718 | goto end_rmdir; | 2718 | goto end_rmdir; |
2719 | 2719 | ||
2720 | inode = dentry->d_inode; | 2720 | inode = d_inode(dentry); |
2721 | 2721 | ||
2722 | retval = -EIO; | 2722 | retval = -EIO; |
2723 | if (le32_to_cpu(de->inode) != inode->i_ino) | 2723 | if (le32_to_cpu(de->inode) != inode->i_ino) |
@@ -2777,7 +2777,7 @@ static int ext4_unlink(struct inode *dir, struct dentry *dentry) | |||
2777 | /* Initialize quotas before so that eventual writes go | 2777 | /* Initialize quotas before so that eventual writes go |
2778 | * in separate transaction */ | 2778 | * in separate transaction */ |
2779 | dquot_initialize(dir); | 2779 | dquot_initialize(dir); |
2780 | dquot_initialize(dentry->d_inode); | 2780 | dquot_initialize(d_inode(dentry)); |
2781 | 2781 | ||
2782 | retval = -ENOENT; | 2782 | retval = -ENOENT; |
2783 | bh = ext4_find_entry(dir, &dentry->d_name, &de, NULL); | 2783 | bh = ext4_find_entry(dir, &dentry->d_name, &de, NULL); |
@@ -2786,7 +2786,7 @@ static int ext4_unlink(struct inode *dir, struct dentry *dentry) | |||
2786 | if (!bh) | 2786 | if (!bh) |
2787 | goto end_unlink; | 2787 | goto end_unlink; |
2788 | 2788 | ||
2789 | inode = dentry->d_inode; | 2789 | inode = d_inode(dentry); |
2790 | 2790 | ||
2791 | retval = -EIO; | 2791 | retval = -EIO; |
2792 | if (le32_to_cpu(de->inode) != inode->i_ino) | 2792 | if (le32_to_cpu(de->inode) != inode->i_ino) |
@@ -2938,7 +2938,7 @@ static int ext4_link(struct dentry *old_dentry, | |||
2938 | struct inode *dir, struct dentry *dentry) | 2938 | struct inode *dir, struct dentry *dentry) |
2939 | { | 2939 | { |
2940 | handle_t *handle; | 2940 | handle_t *handle; |
2941 | struct inode *inode = old_dentry->d_inode; | 2941 | struct inode *inode = d_inode(old_dentry); |
2942 | int err, retries = 0; | 2942 | int err, retries = 0; |
2943 | 2943 | ||
2944 | if (inode->i_nlink >= EXT4_LINK_MAX) | 2944 | if (inode->i_nlink >= EXT4_LINK_MAX) |
@@ -3210,12 +3210,12 @@ static int ext4_rename(struct inode *old_dir, struct dentry *old_dentry, | |||
3210 | struct ext4_renament old = { | 3210 | struct ext4_renament old = { |
3211 | .dir = old_dir, | 3211 | .dir = old_dir, |
3212 | .dentry = old_dentry, | 3212 | .dentry = old_dentry, |
3213 | .inode = old_dentry->d_inode, | 3213 | .inode = d_inode(old_dentry), |
3214 | }; | 3214 | }; |
3215 | struct ext4_renament new = { | 3215 | struct ext4_renament new = { |
3216 | .dir = new_dir, | 3216 | .dir = new_dir, |
3217 | .dentry = new_dentry, | 3217 | .dentry = new_dentry, |
3218 | .inode = new_dentry->d_inode, | 3218 | .inode = d_inode(new_dentry), |
3219 | }; | 3219 | }; |
3220 | int force_reread; | 3220 | int force_reread; |
3221 | int retval; | 3221 | int retval; |
@@ -3391,12 +3391,12 @@ static int ext4_cross_rename(struct inode *old_dir, struct dentry *old_dentry, | |||
3391 | struct ext4_renament old = { | 3391 | struct ext4_renament old = { |
3392 | .dir = old_dir, | 3392 | .dir = old_dir, |
3393 | .dentry = old_dentry, | 3393 | .dentry = old_dentry, |
3394 | .inode = old_dentry->d_inode, | 3394 | .inode = d_inode(old_dentry), |
3395 | }; | 3395 | }; |
3396 | struct ext4_renament new = { | 3396 | struct ext4_renament new = { |
3397 | .dir = new_dir, | 3397 | .dir = new_dir, |
3398 | .dentry = new_dentry, | 3398 | .dentry = new_dentry, |
3399 | .inode = new_dentry->d_inode, | 3399 | .inode = d_inode(new_dentry), |
3400 | }; | 3400 | }; |
3401 | u8 new_file_type; | 3401 | u8 new_file_type; |
3402 | int retval; | 3402 | int retval; |