diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-04-26 18:48:49 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-04-26 20:22:07 -0400 |
commit | 9ec3a646fe09970f801ab15e0f1694060b9f19af (patch) | |
tree | 697058ca7e1671eda180a3ccc62445686fbc1a31 /fs/ext4 | |
parent | c8b3fd0ce313443731e8fd6d5a541085eb465f99 (diff) | |
parent | 3cab989afd8d8d1bc3d99fef0e7ed87c31e7b647 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull fourth vfs update from Al Viro:
"d_inode() annotations from David Howells (sat in for-next since before
the beginning of merge window) + four assorted fixes"
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
RCU pathwalk breakage when running into a symlink overmounting something
fix I_DIO_WAKEUP definition
direct-io: only inc/dec inode->i_dio_count for file systems
fs/9p: fix readdir()
VFS: assorted d_backing_inode() annotations
VFS: fs/inode.c helpers: d_inode() annotations
VFS: fs/cachefiles: d_backing_inode() annotations
VFS: fs library helpers: d_inode() annotations
VFS: assorted weird filesystems: d_inode() annotations
VFS: normal filesystems (and lustre): d_inode() annotations
VFS: security/: d_inode() annotations
VFS: security/: d_backing_inode() annotations
VFS: net/: d_inode() annotations
VFS: net/unix: d_backing_inode() annotations
VFS: kernel/: d_inode() annotations
VFS: audit: d_backing_inode() annotations
VFS: Fix up some ->d_inode accesses in the chelsio driver
VFS: Cachefiles should perform fs modifications on the top layer only
VFS: AF_UNIX sockets should call mknod on the top layer only
Diffstat (limited to 'fs/ext4')
-rw-r--r-- | fs/ext4/fsync.c | 2 | ||||
-rw-r--r-- | fs/ext4/ialloc.c | 2 | ||||
-rw-r--r-- | fs/ext4/indirect.c | 6 | ||||
-rw-r--r-- | fs/ext4/inline.c | 4 | ||||
-rw-r--r-- | fs/ext4/inode.c | 8 | ||||
-rw-r--r-- | fs/ext4/migrate.c | 2 | ||||
-rw-r--r-- | fs/ext4/namei.c | 34 | ||||
-rw-r--r-- | fs/ext4/super.c | 6 | ||||
-rw-r--r-- | fs/ext4/symlink.c | 8 | ||||
-rw-r--r-- | fs/ext4/xattr.c | 10 | ||||
-rw-r--r-- | fs/ext4/xattr_security.c | 4 | ||||
-rw-r--r-- | fs/ext4/xattr_trusted.c | 4 | ||||
-rw-r--r-- | fs/ext4/xattr_user.c | 4 |
13 files changed, 47 insertions, 47 deletions
diff --git a/fs/ext4/fsync.c b/fs/ext4/fsync.c index e9d632e9aa4b..8850254136ae 100644 --- a/fs/ext4/fsync.c +++ b/fs/ext4/fsync.c | |||
@@ -55,7 +55,7 @@ static int ext4_sync_parent(struct inode *inode) | |||
55 | dentry = d_find_any_alias(inode); | 55 | dentry = d_find_any_alias(inode); |
56 | if (!dentry) | 56 | if (!dentry) |
57 | break; | 57 | break; |
58 | next = igrab(dentry->d_parent->d_inode); | 58 | next = igrab(d_inode(dentry->d_parent)); |
59 | dput(dentry); | 59 | dput(dentry); |
60 | if (!next) | 60 | if (!next) |
61 | break; | 61 | break; |
diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c index 2cf18a2d5c72..1eaa6cb96cd0 100644 --- a/fs/ext4/ialloc.c +++ b/fs/ext4/ialloc.c | |||
@@ -443,7 +443,7 @@ static int find_group_orlov(struct super_block *sb, struct inode *parent, | |||
443 | ndirs = percpu_counter_read_positive(&sbi->s_dirs_counter); | 443 | ndirs = percpu_counter_read_positive(&sbi->s_dirs_counter); |
444 | 444 | ||
445 | if (S_ISDIR(mode) && | 445 | if (S_ISDIR(mode) && |
446 | ((parent == sb->s_root->d_inode) || | 446 | ((parent == d_inode(sb->s_root)) || |
447 | (ext4_test_inode_flag(parent, EXT4_INODE_TOPDIR)))) { | 447 | (ext4_test_inode_flag(parent, EXT4_INODE_TOPDIR)))) { |
448 | int best_ndir = inodes_per_group; | 448 | int best_ndir = inodes_per_group; |
449 | int ret = -1; | 449 | int ret = -1; |
diff --git a/fs/ext4/indirect.c b/fs/ext4/indirect.c index 3580629e42d3..958824019509 100644 --- a/fs/ext4/indirect.c +++ b/fs/ext4/indirect.c | |||
@@ -682,11 +682,11 @@ retry: | |||
682 | * via ext4_inode_block_unlocked_dio(). Check inode's state | 682 | * via ext4_inode_block_unlocked_dio(). Check inode's state |
683 | * while holding extra i_dio_count ref. | 683 | * while holding extra i_dio_count ref. |
684 | */ | 684 | */ |
685 | atomic_inc(&inode->i_dio_count); | 685 | inode_dio_begin(inode); |
686 | smp_mb(); | 686 | smp_mb(); |
687 | if (unlikely(ext4_test_inode_state(inode, | 687 | if (unlikely(ext4_test_inode_state(inode, |
688 | EXT4_STATE_DIOREAD_LOCK))) { | 688 | EXT4_STATE_DIOREAD_LOCK))) { |
689 | inode_dio_done(inode); | 689 | inode_dio_end(inode); |
690 | goto locked; | 690 | goto locked; |
691 | } | 691 | } |
692 | if (IS_DAX(inode)) | 692 | if (IS_DAX(inode)) |
@@ -697,7 +697,7 @@ retry: | |||
697 | inode->i_sb->s_bdev, iter, | 697 | inode->i_sb->s_bdev, iter, |
698 | offset, ext4_get_block, NULL, | 698 | offset, ext4_get_block, NULL, |
699 | NULL, 0); | 699 | NULL, 0); |
700 | inode_dio_done(inode); | 700 | inode_dio_end(inode); |
701 | } else { | 701 | } else { |
702 | locked: | 702 | locked: |
703 | if (IS_DAX(inode)) | 703 | if (IS_DAX(inode)) |
diff --git a/fs/ext4/inline.c b/fs/ext4/inline.c index feb2cafbeace..095c7a258d97 100644 --- a/fs/ext4/inline.c +++ b/fs/ext4/inline.c | |||
@@ -1000,7 +1000,7 @@ static int ext4_add_dirent_to_inline(handle_t *handle, | |||
1000 | struct ext4_iloc *iloc, | 1000 | struct ext4_iloc *iloc, |
1001 | void *inline_start, int inline_size) | 1001 | void *inline_start, int inline_size) |
1002 | { | 1002 | { |
1003 | struct inode *dir = dentry->d_parent->d_inode; | 1003 | struct inode *dir = d_inode(dentry->d_parent); |
1004 | const char *name = dentry->d_name.name; | 1004 | const char *name = dentry->d_name.name; |
1005 | int namelen = dentry->d_name.len; | 1005 | int namelen = dentry->d_name.len; |
1006 | int err; | 1006 | int err; |
@@ -1254,7 +1254,7 @@ int ext4_try_add_inline_entry(handle_t *handle, struct dentry *dentry, | |||
1254 | int ret, inline_size; | 1254 | int ret, inline_size; |
1255 | void *inline_start; | 1255 | void *inline_start; |
1256 | struct ext4_iloc iloc; | 1256 | struct ext4_iloc iloc; |
1257 | struct inode *dir = dentry->d_parent->d_inode; | 1257 | struct inode *dir = d_inode(dentry->d_parent); |
1258 | 1258 | ||
1259 | ret = ext4_get_inode_loc(dir, &iloc); | 1259 | ret = ext4_get_inode_loc(dir, &iloc); |
1260 | if (ret) | 1260 | if (ret) |
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 366476e71e10..cbd0654a2675 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c | |||
@@ -3077,7 +3077,7 @@ static ssize_t ext4_ext_direct_IO(struct kiocb *iocb, struct iov_iter *iter, | |||
3077 | * overwrite DIO as i_dio_count needs to be incremented under i_mutex. | 3077 | * overwrite DIO as i_dio_count needs to be incremented under i_mutex. |
3078 | */ | 3078 | */ |
3079 | if (iov_iter_rw(iter) == WRITE) | 3079 | if (iov_iter_rw(iter) == WRITE) |
3080 | atomic_inc(&inode->i_dio_count); | 3080 | inode_dio_begin(inode); |
3081 | 3081 | ||
3082 | /* If we do a overwrite dio, i_mutex locking can be released */ | 3082 | /* If we do a overwrite dio, i_mutex locking can be released */ |
3083 | overwrite = *((int *)iocb->private); | 3083 | overwrite = *((int *)iocb->private); |
@@ -3182,7 +3182,7 @@ static ssize_t ext4_ext_direct_IO(struct kiocb *iocb, struct iov_iter *iter, | |||
3182 | 3182 | ||
3183 | retake_lock: | 3183 | retake_lock: |
3184 | if (iov_iter_rw(iter) == WRITE) | 3184 | if (iov_iter_rw(iter) == WRITE) |
3185 | inode_dio_done(inode); | 3185 | inode_dio_end(inode); |
3186 | /* take i_mutex locking again if we do a ovewrite dio */ | 3186 | /* take i_mutex locking again if we do a ovewrite dio */ |
3187 | if (overwrite) { | 3187 | if (overwrite) { |
3188 | up_read(&EXT4_I(inode)->i_data_sem); | 3188 | up_read(&EXT4_I(inode)->i_data_sem); |
@@ -4637,7 +4637,7 @@ static void ext4_wait_for_tail_page_commit(struct inode *inode) | |||
4637 | */ | 4637 | */ |
4638 | int ext4_setattr(struct dentry *dentry, struct iattr *attr) | 4638 | int ext4_setattr(struct dentry *dentry, struct iattr *attr) |
4639 | { | 4639 | { |
4640 | struct inode *inode = dentry->d_inode; | 4640 | struct inode *inode = d_inode(dentry); |
4641 | int error, rc = 0; | 4641 | int error, rc = 0; |
4642 | int orphan = 0; | 4642 | int orphan = 0; |
4643 | const unsigned int ia_valid = attr->ia_valid; | 4643 | const unsigned int ia_valid = attr->ia_valid; |
@@ -4785,7 +4785,7 @@ int ext4_getattr(struct vfsmount *mnt, struct dentry *dentry, | |||
4785 | struct inode *inode; | 4785 | struct inode *inode; |
4786 | unsigned long long delalloc_blocks; | 4786 | unsigned long long delalloc_blocks; |
4787 | 4787 | ||
4788 | inode = dentry->d_inode; | 4788 | inode = d_inode(dentry); |
4789 | generic_fillattr(inode, stat); | 4789 | generic_fillattr(inode, stat); |
4790 | 4790 | ||
4791 | /* | 4791 | /* |
diff --git a/fs/ext4/migrate.c b/fs/ext4/migrate.c index 3cb267aee802..b52374e42102 100644 --- a/fs/ext4/migrate.c +++ b/fs/ext4/migrate.c | |||
@@ -475,7 +475,7 @@ int ext4_ext_migrate(struct inode *inode) | |||
475 | EXT4_INODES_PER_GROUP(inode->i_sb)) + 1; | 475 | EXT4_INODES_PER_GROUP(inode->i_sb)) + 1; |
476 | owner[0] = i_uid_read(inode); | 476 | owner[0] = i_uid_read(inode); |
477 | owner[1] = i_gid_read(inode); | 477 | owner[1] = i_gid_read(inode); |
478 | tmp_inode = ext4_new_inode(handle, inode->i_sb->s_root->d_inode, | 478 | tmp_inode = ext4_new_inode(handle, d_inode(inode->i_sb->s_root), |
479 | S_IFREG, NULL, goal, owner); | 479 | S_IFREG, NULL, goal, owner); |
480 | if (IS_ERR(tmp_inode)) { | 480 | if (IS_ERR(tmp_inode)) { |
481 | retval = PTR_ERR(tmp_inode); | 481 | retval = PTR_ERR(tmp_inode); |
diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c index ef22cd951c0c..7223b0b4bc38 100644 --- a/fs/ext4/namei.c +++ b/fs/ext4/namei.c | |||
@@ -1664,7 +1664,7 @@ struct dentry *ext4_get_parent(struct dentry *child) | |||
1664 | struct ext4_dir_entry_2 * de; | 1664 | struct ext4_dir_entry_2 * de; |
1665 | struct buffer_head *bh; | 1665 | struct buffer_head *bh; |
1666 | 1666 | ||
1667 | bh = ext4_find_entry(child->d_inode, &dotdot, &de, NULL); | 1667 | bh = ext4_find_entry(d_inode(child), &dotdot, &de, NULL); |
1668 | if (IS_ERR(bh)) | 1668 | if (IS_ERR(bh)) |
1669 | return (struct dentry *) bh; | 1669 | return (struct dentry *) bh; |
1670 | if (!bh) | 1670 | if (!bh) |
@@ -1672,13 +1672,13 @@ struct dentry *ext4_get_parent(struct dentry *child) | |||
1672 | ino = le32_to_cpu(de->inode); | 1672 | ino = le32_to_cpu(de->inode); |
1673 | brelse(bh); | 1673 | brelse(bh); |
1674 | 1674 | ||
1675 | if (!ext4_valid_inum(child->d_inode->i_sb, ino)) { | 1675 | if (!ext4_valid_inum(d_inode(child)->i_sb, ino)) { |
1676 | EXT4_ERROR_INODE(child->d_inode, | 1676 | EXT4_ERROR_INODE(d_inode(child), |
1677 | "bad parent inode number: %u", ino); | 1677 | "bad parent inode number: %u", ino); |
1678 | return ERR_PTR(-EIO); | 1678 | return ERR_PTR(-EIO); |
1679 | } | 1679 | } |
1680 | 1680 | ||
1681 | return d_obtain_alias(ext4_iget_normal(child->d_inode->i_sb, ino)); | 1681 | return d_obtain_alias(ext4_iget_normal(d_inode(child)->i_sb, ino)); |
1682 | } | 1682 | } |
1683 | 1683 | ||
1684 | /* | 1684 | /* |
@@ -1988,7 +1988,7 @@ static int add_dirent_to_buf(handle_t *handle, struct dentry *dentry, | |||
1988 | struct inode *inode, struct ext4_dir_entry_2 *de, | 1988 | struct inode *inode, struct ext4_dir_entry_2 *de, |
1989 | struct buffer_head *bh) | 1989 | struct buffer_head *bh) |
1990 | { | 1990 | { |
1991 | struct inode *dir = dentry->d_parent->d_inode; | 1991 | struct inode *dir = d_inode(dentry->d_parent); |
1992 | const char *name = dentry->d_name.name; | 1992 | const char *name = dentry->d_name.name; |
1993 | int namelen = dentry->d_name.len; | 1993 | int namelen = dentry->d_name.len; |
1994 | unsigned int blocksize = dir->i_sb->s_blocksize; | 1994 | unsigned int blocksize = dir->i_sb->s_blocksize; |
@@ -2048,7 +2048,7 @@ static int add_dirent_to_buf(handle_t *handle, struct dentry *dentry, | |||
2048 | static int make_indexed_dir(handle_t *handle, struct dentry *dentry, | 2048 | static int make_indexed_dir(handle_t *handle, struct dentry *dentry, |
2049 | struct inode *inode, struct buffer_head *bh) | 2049 | struct inode *inode, struct buffer_head *bh) |
2050 | { | 2050 | { |
2051 | struct inode *dir = dentry->d_parent->d_inode; | 2051 | struct inode *dir = d_inode(dentry->d_parent); |
2052 | #ifdef CONFIG_EXT4_FS_ENCRYPTION | 2052 | #ifdef CONFIG_EXT4_FS_ENCRYPTION |
2053 | struct ext4_fname_crypto_ctx *ctx = NULL; | 2053 | struct ext4_fname_crypto_ctx *ctx = NULL; |
2054 | int res; | 2054 | int res; |
@@ -2202,7 +2202,7 @@ out_frames: | |||
2202 | static int ext4_add_entry(handle_t *handle, struct dentry *dentry, | 2202 | static int ext4_add_entry(handle_t *handle, struct dentry *dentry, |
2203 | struct inode *inode) | 2203 | struct inode *inode) |
2204 | { | 2204 | { |
2205 | struct inode *dir = dentry->d_parent->d_inode; | 2205 | struct inode *dir = d_inode(dentry->d_parent); |
2206 | struct buffer_head *bh = NULL; | 2206 | struct buffer_head *bh = NULL; |
2207 | struct ext4_dir_entry_2 *de; | 2207 | struct ext4_dir_entry_2 *de; |
2208 | struct ext4_dir_entry_tail *t; | 2208 | struct ext4_dir_entry_tail *t; |
@@ -2287,7 +2287,7 @@ static int ext4_dx_add_entry(handle_t *handle, struct dentry *dentry, | |||
2287 | struct dx_entry *entries, *at; | 2287 | struct dx_entry *entries, *at; |
2288 | struct dx_hash_info hinfo; | 2288 | struct dx_hash_info hinfo; |
2289 | struct buffer_head *bh; | 2289 | struct buffer_head *bh; |
2290 | struct inode *dir = dentry->d_parent->d_inode; | 2290 | struct inode *dir = d_inode(dentry->d_parent); |
2291 | struct super_block *sb = dir->i_sb; | 2291 | struct super_block *sb = dir->i_sb; |
2292 | struct ext4_dir_entry_2 *de; | 2292 | struct ext4_dir_entry_2 *de; |
2293 | int err; | 2293 | int err; |
@@ -3063,7 +3063,7 @@ static int ext4_rmdir(struct inode *dir, struct dentry *dentry) | |||
3063 | /* Initialize quotas before so that eventual writes go in | 3063 | /* Initialize quotas before so that eventual writes go in |
3064 | * separate transaction */ | 3064 | * separate transaction */ |
3065 | dquot_initialize(dir); | 3065 | dquot_initialize(dir); |
3066 | dquot_initialize(dentry->d_inode); | 3066 | dquot_initialize(d_inode(dentry)); |
3067 | 3067 | ||
3068 | retval = -ENOENT; | 3068 | retval = -ENOENT; |
3069 | bh = ext4_find_entry(dir, &dentry->d_name, &de, NULL); | 3069 | bh = ext4_find_entry(dir, &dentry->d_name, &de, NULL); |
@@ -3072,7 +3072,7 @@ static int ext4_rmdir(struct inode *dir, struct dentry *dentry) | |||
3072 | if (!bh) | 3072 | if (!bh) |
3073 | goto end_rmdir; | 3073 | goto end_rmdir; |
3074 | 3074 | ||
3075 | inode = dentry->d_inode; | 3075 | inode = d_inode(dentry); |
3076 | 3076 | ||
3077 | retval = -EIO; | 3077 | retval = -EIO; |
3078 | if (le32_to_cpu(de->inode) != inode->i_ino) | 3078 | if (le32_to_cpu(de->inode) != inode->i_ino) |
@@ -3132,7 +3132,7 @@ static int ext4_unlink(struct inode *dir, struct dentry *dentry) | |||
3132 | /* Initialize quotas before so that eventual writes go | 3132 | /* Initialize quotas before so that eventual writes go |
3133 | * in separate transaction */ | 3133 | * in separate transaction */ |
3134 | dquot_initialize(dir); | 3134 | dquot_initialize(dir); |
3135 | dquot_initialize(dentry->d_inode); | 3135 | dquot_initialize(d_inode(dentry)); |
3136 | 3136 | ||
3137 | retval = -ENOENT; | 3137 | retval = -ENOENT; |
3138 | bh = ext4_find_entry(dir, &dentry->d_name, &de, NULL); | 3138 | bh = ext4_find_entry(dir, &dentry->d_name, &de, NULL); |
@@ -3141,7 +3141,7 @@ static int ext4_unlink(struct inode *dir, struct dentry *dentry) | |||
3141 | if (!bh) | 3141 | if (!bh) |
3142 | goto end_unlink; | 3142 | goto end_unlink; |
3143 | 3143 | ||
3144 | inode = dentry->d_inode; | 3144 | inode = d_inode(dentry); |
3145 | 3145 | ||
3146 | retval = -EIO; | 3146 | retval = -EIO; |
3147 | if (le32_to_cpu(de->inode) != inode->i_ino) | 3147 | if (le32_to_cpu(de->inode) != inode->i_ino) |
@@ -3339,7 +3339,7 @@ static int ext4_link(struct dentry *old_dentry, | |||
3339 | struct inode *dir, struct dentry *dentry) | 3339 | struct inode *dir, struct dentry *dentry) |
3340 | { | 3340 | { |
3341 | handle_t *handle; | 3341 | handle_t *handle; |
3342 | struct inode *inode = old_dentry->d_inode; | 3342 | struct inode *inode = d_inode(old_dentry); |
3343 | int err, retries = 0; | 3343 | int err, retries = 0; |
3344 | 3344 | ||
3345 | if (inode->i_nlink >= EXT4_LINK_MAX) | 3345 | if (inode->i_nlink >= EXT4_LINK_MAX) |
@@ -3613,12 +3613,12 @@ static int ext4_rename(struct inode *old_dir, struct dentry *old_dentry, | |||
3613 | struct ext4_renament old = { | 3613 | struct ext4_renament old = { |
3614 | .dir = old_dir, | 3614 | .dir = old_dir, |
3615 | .dentry = old_dentry, | 3615 | .dentry = old_dentry, |
3616 | .inode = old_dentry->d_inode, | 3616 | .inode = d_inode(old_dentry), |
3617 | }; | 3617 | }; |
3618 | struct ext4_renament new = { | 3618 | struct ext4_renament new = { |
3619 | .dir = new_dir, | 3619 | .dir = new_dir, |
3620 | .dentry = new_dentry, | 3620 | .dentry = new_dentry, |
3621 | .inode = new_dentry->d_inode, | 3621 | .inode = d_inode(new_dentry), |
3622 | }; | 3622 | }; |
3623 | int force_reread; | 3623 | int force_reread; |
3624 | int retval; | 3624 | int retval; |
@@ -3809,12 +3809,12 @@ static int ext4_cross_rename(struct inode *old_dir, struct dentry *old_dentry, | |||
3809 | struct ext4_renament old = { | 3809 | struct ext4_renament old = { |
3810 | .dir = old_dir, | 3810 | .dir = old_dir, |
3811 | .dentry = old_dentry, | 3811 | .dentry = old_dentry, |
3812 | .inode = old_dentry->d_inode, | 3812 | .inode = d_inode(old_dentry), |
3813 | }; | 3813 | }; |
3814 | struct ext4_renament new = { | 3814 | struct ext4_renament new = { |
3815 | .dir = new_dir, | 3815 | .dir = new_dir, |
3816 | .dentry = new_dentry, | 3816 | .dentry = new_dentry, |
3817 | .inode = new_dentry->d_inode, | 3817 | .inode = d_inode(new_dentry), |
3818 | }; | 3818 | }; |
3819 | u8 new_file_type; | 3819 | u8 new_file_type; |
3820 | int retval; | 3820 | int retval; |
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 821f22dbe825..f06d0589ddba 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c | |||
@@ -1556,7 +1556,7 @@ static int handle_mount_opt(struct super_block *sb, char *opt, int token, | |||
1556 | return -1; | 1556 | return -1; |
1557 | } | 1557 | } |
1558 | 1558 | ||
1559 | journal_inode = path.dentry->d_inode; | 1559 | journal_inode = d_inode(path.dentry); |
1560 | if (!S_ISBLK(journal_inode->i_mode)) { | 1560 | if (!S_ISBLK(journal_inode->i_mode)) { |
1561 | ext4_msg(sb, KERN_ERR, "error: journal path %s " | 1561 | ext4_msg(sb, KERN_ERR, "error: journal path %s " |
1562 | "is not a block device", journal_path); | 1562 | "is not a block device", journal_path); |
@@ -5217,7 +5217,7 @@ static int ext4_write_info(struct super_block *sb, int type) | |||
5217 | handle_t *handle; | 5217 | handle_t *handle; |
5218 | 5218 | ||
5219 | /* Data block + inode block */ | 5219 | /* Data block + inode block */ |
5220 | handle = ext4_journal_start(sb->s_root->d_inode, EXT4_HT_QUOTA, 2); | 5220 | handle = ext4_journal_start(d_inode(sb->s_root), EXT4_HT_QUOTA, 2); |
5221 | if (IS_ERR(handle)) | 5221 | if (IS_ERR(handle)) |
5222 | return PTR_ERR(handle); | 5222 | return PTR_ERR(handle); |
5223 | ret = dquot_commit_info(sb, type); | 5223 | ret = dquot_commit_info(sb, type); |
@@ -5265,7 +5265,7 @@ static int ext4_quota_on(struct super_block *sb, int type, int format_id, | |||
5265 | * all updates to the file when we bypass pagecache... | 5265 | * all updates to the file when we bypass pagecache... |
5266 | */ | 5266 | */ |
5267 | if (EXT4_SB(sb)->s_journal && | 5267 | if (EXT4_SB(sb)->s_journal && |
5268 | ext4_should_journal_data(path->dentry->d_inode)) { | 5268 | ext4_should_journal_data(d_inode(path->dentry))) { |
5269 | /* | 5269 | /* |
5270 | * We don't need to lock updates but journal_flush() could | 5270 | * We don't need to lock updates but journal_flush() could |
5271 | * otherwise be livelocked... | 5271 | * otherwise be livelocked... |
diff --git a/fs/ext4/symlink.c b/fs/ext4/symlink.c index 136ca0e911fd..19f78f20975e 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) | |||
28 | struct page *cpage = NULL; | 28 | struct page *cpage = NULL; |
29 | char *caddr, *paddr = NULL; | 29 | char *caddr, *paddr = NULL; |
30 | struct ext4_str cstr, pstr; | 30 | struct ext4_str cstr, pstr; |
31 | struct inode *inode = dentry->d_inode; | 31 | struct inode *inode = d_inode(dentry); |
32 | struct ext4_fname_crypto_ctx *ctx = NULL; | 32 | struct ext4_fname_crypto_ctx *ctx = NULL; |
33 | struct ext4_encrypted_symlink_data *sd; | 33 | struct ext4_encrypted_symlink_data *sd; |
34 | loff_t size = min_t(loff_t, i_size_read(inode), PAGE_SIZE - 1); | 34 | 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) | |||
43 | return ctx; | 43 | return ctx; |
44 | 44 | ||
45 | if (ext4_inode_is_fast_symlink(inode)) { | 45 | if (ext4_inode_is_fast_symlink(inode)) { |
46 | caddr = (char *) EXT4_I(dentry->d_inode)->i_data; | 46 | caddr = (char *) EXT4_I(inode)->i_data; |
47 | max_size = sizeof(EXT4_I(dentry->d_inode)->i_data); | 47 | max_size = sizeof(EXT4_I(inode)->i_data); |
48 | } else { | 48 | } else { |
49 | cpage = read_mapping_page(inode->i_mapping, 0, NULL); | 49 | cpage = read_mapping_page(inode->i_mapping, 0, NULL); |
50 | if (IS_ERR(cpage)) { | 50 | if (IS_ERR(cpage)) { |
@@ -113,7 +113,7 @@ static void ext4_put_link(struct dentry *dentry, struct nameidata *nd, | |||
113 | 113 | ||
114 | static void *ext4_follow_fast_link(struct dentry *dentry, struct nameidata *nd) | 114 | static void *ext4_follow_fast_link(struct dentry *dentry, struct nameidata *nd) |
115 | { | 115 | { |
116 | struct ext4_inode_info *ei = EXT4_I(dentry->d_inode); | 116 | struct ext4_inode_info *ei = EXT4_I(d_inode(dentry)); |
117 | nd_set_link(nd, (char *) ei->i_data); | 117 | nd_set_link(nd, (char *) ei->i_data); |
118 | return NULL; | 118 | return NULL; |
119 | } | 119 | } |
diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c index 759842ff8af0..16e28c08d1e8 100644 --- a/fs/ext4/xattr.c +++ b/fs/ext4/xattr.c | |||
@@ -178,7 +178,7 @@ ext4_xattr_handler(int name_index) | |||
178 | /* | 178 | /* |
179 | * Inode operation listxattr() | 179 | * Inode operation listxattr() |
180 | * | 180 | * |
181 | * dentry->d_inode->i_mutex: don't care | 181 | * d_inode(dentry)->i_mutex: don't care |
182 | */ | 182 | */ |
183 | ssize_t | 183 | ssize_t |
184 | ext4_listxattr(struct dentry *dentry, char *buffer, size_t size) | 184 | ext4_listxattr(struct dentry *dentry, char *buffer, size_t size) |
@@ -423,7 +423,7 @@ ext4_xattr_list_entries(struct dentry *dentry, struct ext4_xattr_entry *entry, | |||
423 | static int | 423 | static int |
424 | ext4_xattr_block_list(struct dentry *dentry, char *buffer, size_t buffer_size) | 424 | ext4_xattr_block_list(struct dentry *dentry, char *buffer, size_t buffer_size) |
425 | { | 425 | { |
426 | struct inode *inode = dentry->d_inode; | 426 | struct inode *inode = d_inode(dentry); |
427 | struct buffer_head *bh = NULL; | 427 | struct buffer_head *bh = NULL; |
428 | int error; | 428 | int error; |
429 | struct mb_cache *ext4_mb_cache = EXT4_GET_MB_CACHE(inode); | 429 | struct mb_cache *ext4_mb_cache = EXT4_GET_MB_CACHE(inode); |
@@ -460,7 +460,7 @@ cleanup: | |||
460 | static int | 460 | static int |
461 | ext4_xattr_ibody_list(struct dentry *dentry, char *buffer, size_t buffer_size) | 461 | ext4_xattr_ibody_list(struct dentry *dentry, char *buffer, size_t buffer_size) |
462 | { | 462 | { |
463 | struct inode *inode = dentry->d_inode; | 463 | struct inode *inode = d_inode(dentry); |
464 | struct ext4_xattr_ibody_header *header; | 464 | struct ext4_xattr_ibody_header *header; |
465 | struct ext4_inode *raw_inode; | 465 | struct ext4_inode *raw_inode; |
466 | struct ext4_iloc iloc; | 466 | struct ext4_iloc iloc; |
@@ -501,7 +501,7 @@ ext4_xattr_list(struct dentry *dentry, char *buffer, size_t buffer_size) | |||
501 | { | 501 | { |
502 | int ret, ret2; | 502 | int ret, ret2; |
503 | 503 | ||
504 | down_read(&EXT4_I(dentry->d_inode)->xattr_sem); | 504 | down_read(&EXT4_I(d_inode(dentry))->xattr_sem); |
505 | ret = ret2 = ext4_xattr_ibody_list(dentry, buffer, buffer_size); | 505 | ret = ret2 = ext4_xattr_ibody_list(dentry, buffer, buffer_size); |
506 | if (ret < 0) | 506 | if (ret < 0) |
507 | goto errout; | 507 | goto errout; |
@@ -514,7 +514,7 @@ ext4_xattr_list(struct dentry *dentry, char *buffer, size_t buffer_size) | |||
514 | goto errout; | 514 | goto errout; |
515 | ret += ret2; | 515 | ret += ret2; |
516 | errout: | 516 | errout: |
517 | up_read(&EXT4_I(dentry->d_inode)->xattr_sem); | 517 | up_read(&EXT4_I(d_inode(dentry))->xattr_sem); |
518 | return ret; | 518 | return ret; |
519 | } | 519 | } |
520 | 520 | ||
diff --git a/fs/ext4/xattr_security.c b/fs/ext4/xattr_security.c index d2a200624af5..95d90e0560f0 100644 --- a/fs/ext4/xattr_security.c +++ b/fs/ext4/xattr_security.c | |||
@@ -33,7 +33,7 @@ ext4_xattr_security_get(struct dentry *dentry, const char *name, | |||
33 | { | 33 | { |
34 | if (strcmp(name, "") == 0) | 34 | if (strcmp(name, "") == 0) |
35 | return -EINVAL; | 35 | return -EINVAL; |
36 | return ext4_xattr_get(dentry->d_inode, EXT4_XATTR_INDEX_SECURITY, | 36 | return ext4_xattr_get(d_inode(dentry), EXT4_XATTR_INDEX_SECURITY, |
37 | name, buffer, size); | 37 | name, buffer, size); |
38 | } | 38 | } |
39 | 39 | ||
@@ -43,7 +43,7 @@ ext4_xattr_security_set(struct dentry *dentry, const char *name, | |||
43 | { | 43 | { |
44 | if (strcmp(name, "") == 0) | 44 | if (strcmp(name, "") == 0) |
45 | return -EINVAL; | 45 | return -EINVAL; |
46 | return ext4_xattr_set(dentry->d_inode, EXT4_XATTR_INDEX_SECURITY, | 46 | return ext4_xattr_set(d_inode(dentry), EXT4_XATTR_INDEX_SECURITY, |
47 | name, value, size, flags); | 47 | name, value, size, flags); |
48 | } | 48 | } |
49 | 49 | ||
diff --git a/fs/ext4/xattr_trusted.c b/fs/ext4/xattr_trusted.c index 95f1f4ab59a4..891ee2ddfbd6 100644 --- a/fs/ext4/xattr_trusted.c +++ b/fs/ext4/xattr_trusted.c | |||
@@ -36,7 +36,7 @@ ext4_xattr_trusted_get(struct dentry *dentry, const char *name, void *buffer, | |||
36 | { | 36 | { |
37 | if (strcmp(name, "") == 0) | 37 | if (strcmp(name, "") == 0) |
38 | return -EINVAL; | 38 | return -EINVAL; |
39 | return ext4_xattr_get(dentry->d_inode, EXT4_XATTR_INDEX_TRUSTED, | 39 | return ext4_xattr_get(d_inode(dentry), EXT4_XATTR_INDEX_TRUSTED, |
40 | name, buffer, size); | 40 | name, buffer, size); |
41 | } | 41 | } |
42 | 42 | ||
@@ -46,7 +46,7 @@ ext4_xattr_trusted_set(struct dentry *dentry, const char *name, | |||
46 | { | 46 | { |
47 | if (strcmp(name, "") == 0) | 47 | if (strcmp(name, "") == 0) |
48 | return -EINVAL; | 48 | return -EINVAL; |
49 | return ext4_xattr_set(dentry->d_inode, EXT4_XATTR_INDEX_TRUSTED, | 49 | return ext4_xattr_set(d_inode(dentry), EXT4_XATTR_INDEX_TRUSTED, |
50 | name, value, size, flags); | 50 | name, value, size, flags); |
51 | } | 51 | } |
52 | 52 | ||
diff --git a/fs/ext4/xattr_user.c b/fs/ext4/xattr_user.c index 0edb7611ffbe..6ed932b3c043 100644 --- a/fs/ext4/xattr_user.c +++ b/fs/ext4/xattr_user.c | |||
@@ -37,7 +37,7 @@ ext4_xattr_user_get(struct dentry *dentry, const char *name, | |||
37 | return -EINVAL; | 37 | return -EINVAL; |
38 | if (!test_opt(dentry->d_sb, XATTR_USER)) | 38 | if (!test_opt(dentry->d_sb, XATTR_USER)) |
39 | return -EOPNOTSUPP; | 39 | return -EOPNOTSUPP; |
40 | return ext4_xattr_get(dentry->d_inode, EXT4_XATTR_INDEX_USER, | 40 | return ext4_xattr_get(d_inode(dentry), EXT4_XATTR_INDEX_USER, |
41 | name, buffer, size); | 41 | name, buffer, size); |
42 | } | 42 | } |
43 | 43 | ||
@@ -49,7 +49,7 @@ ext4_xattr_user_set(struct dentry *dentry, const char *name, | |||
49 | return -EINVAL; | 49 | return -EINVAL; |
50 | if (!test_opt(dentry->d_sb, XATTR_USER)) | 50 | if (!test_opt(dentry->d_sb, XATTR_USER)) |
51 | return -EOPNOTSUPP; | 51 | return -EOPNOTSUPP; |
52 | return ext4_xattr_set(dentry->d_inode, EXT4_XATTR_INDEX_USER, | 52 | return ext4_xattr_set(d_inode(dentry), EXT4_XATTR_INDEX_USER, |
53 | name, value, size, flags); | 53 | name, value, size, flags); |
54 | } | 54 | } |
55 | 55 | ||