aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2015-03-17 18:25:59 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2015-04-15 15:06:57 -0400
commit2b0143b5c986be1ce8408b3aadc4709e0a94429d (patch)
tree98b1dee70f3d5d9ac9309f4638e41864ddcd0952 /fs/ext4
parentce0b16ddf18df35026164fda4a642ef10c01f442 (diff)
VFS: normal filesystems (and lustre): d_inode() annotations
that's the bulk of filesystem drivers dealing with inodes of their own Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/ext4')
-rw-r--r--fs/ext4/fsync.c2
-rw-r--r--fs/ext4/ialloc.c2
-rw-r--r--fs/ext4/inline.c4
-rw-r--r--fs/ext4/inode.c4
-rw-r--r--fs/ext4/migrate.c2
-rw-r--r--fs/ext4/namei.c34
-rw-r--r--fs/ext4/super.c6
-rw-r--r--fs/ext4/symlink.c2
-rw-r--r--fs/ext4/xattr.c10
-rw-r--r--fs/ext4/xattr_security.c4
-rw-r--r--fs/ext4/xattr_trusted.c4
-rw-r--r--fs/ext4/xattr_user.c4
12 files changed, 39 insertions, 39 deletions
diff --git a/fs/ext4/fsync.c b/fs/ext4/fsync.c
index a8bc47f75fa0..3ceedea099ea 100644
--- a/fs/ext4/fsync.c
+++ b/fs/ext4/fsync.c
@@ -56,7 +56,7 @@ static int ext4_sync_parent(struct inode *inode)
56 dentry = d_find_any_alias(inode); 56 dentry = d_find_any_alias(inode);
57 if (!dentry) 57 if (!dentry)
58 break; 58 break;
59 next = igrab(dentry->d_parent->d_inode); 59 next = igrab(d_inode(dentry->d_parent));
60 dput(dentry); 60 dput(dentry);
61 if (!next) 61 if (!next)
62 break; 62 break;
diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c
index ac644c31ca67..d8d4f2929cbd 100644
--- a/fs/ext4/ialloc.c
+++ b/fs/ext4/ialloc.c
@@ -444,7 +444,7 @@ static int find_group_orlov(struct super_block *sb, struct inode *parent,
444 ndirs = percpu_counter_read_positive(&sbi->s_dirs_counter); 444 ndirs = percpu_counter_read_positive(&sbi->s_dirs_counter);
445 445
446 if (S_ISDIR(mode) && 446 if (S_ISDIR(mode) &&
447 ((parent == sb->s_root->d_inode) || 447 ((parent == d_inode(sb->s_root)) ||
448 (ext4_test_inode_flag(parent, EXT4_INODE_TOPDIR)))) { 448 (ext4_test_inode_flag(parent, EXT4_INODE_TOPDIR)))) {
449 int best_ndir = inodes_per_group; 449 int best_ndir = inodes_per_group;
450 int ret = -1; 450 int ret = -1;
diff --git a/fs/ext4/inline.c b/fs/ext4/inline.c
index 4b143febf21f..f696948c548b 100644
--- a/fs/ext4/inline.c
+++ b/fs/ext4/inline.c
@@ -998,7 +998,7 @@ static int ext4_add_dirent_to_inline(handle_t *handle,
998 struct ext4_iloc *iloc, 998 struct ext4_iloc *iloc,
999 void *inline_start, int inline_size) 999 void *inline_start, int inline_size)
1000{ 1000{
1001 struct inode *dir = dentry->d_parent->d_inode; 1001 struct inode *dir = d_inode(dentry->d_parent);
1002 const char *name = dentry->d_name.name; 1002 const char *name = dentry->d_name.name;
1003 int namelen = dentry->d_name.len; 1003 int namelen = dentry->d_name.len;
1004 int err; 1004 int err;
@@ -1251,7 +1251,7 @@ int ext4_try_add_inline_entry(handle_t *handle, struct dentry *dentry,
1251 int ret, inline_size; 1251 int ret, inline_size;
1252 void *inline_start; 1252 void *inline_start;
1253 struct ext4_iloc iloc; 1253 struct ext4_iloc iloc;
1254 struct inode *dir = dentry->d_parent->d_inode; 1254 struct inode *dir = d_inode(dentry->d_parent);
1255 1255
1256 ret = ext4_get_inode_loc(dir, &iloc); 1256 ret = ext4_get_inode_loc(dir, &iloc);
1257 if (ret) 1257 if (ret)
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 42c942a950e1..063052e4aa8b 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -4524,7 +4524,7 @@ static void ext4_wait_for_tail_page_commit(struct inode *inode)
4524 */ 4524 */
4525int ext4_setattr(struct dentry *dentry, struct iattr *attr) 4525int ext4_setattr(struct dentry *dentry, struct iattr *attr)
4526{ 4526{
4527 struct inode *inode = dentry->d_inode; 4527 struct inode *inode = d_inode(dentry);
4528 int error, rc = 0; 4528 int error, rc = 0;
4529 int orphan = 0; 4529 int orphan = 0;
4530 const unsigned int ia_valid = attr->ia_valid; 4530 const unsigned int ia_valid = attr->ia_valid;
@@ -4672,7 +4672,7 @@ int ext4_getattr(struct vfsmount *mnt, struct dentry *dentry,
4672 struct inode *inode; 4672 struct inode *inode;
4673 unsigned long long delalloc_blocks; 4673 unsigned long long delalloc_blocks;
4674 4674
4675 inode = dentry->d_inode; 4675 inode = d_inode(dentry);
4676 generic_fillattr(inode, stat); 4676 generic_fillattr(inode, stat);
4677 4677
4678 /* 4678 /*
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 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,
1732static int make_indexed_dir(handle_t *handle, struct dentry *dentry, 1732static 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:
1864static int ext4_add_entry(handle_t *handle, struct dentry *dentry, 1864static 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;
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index e061e66c8280..386ba41fa17b 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -1568,7 +1568,7 @@ static int handle_mount_opt(struct super_block *sb, char *opt, int token,
1568 return -1; 1568 return -1;
1569 } 1569 }
1570 1570
1571 journal_inode = path.dentry->d_inode; 1571 journal_inode = d_inode(path.dentry);
1572 if (!S_ISBLK(journal_inode->i_mode)) { 1572 if (!S_ISBLK(journal_inode->i_mode)) {
1573 ext4_msg(sb, KERN_ERR, "error: journal path %s " 1573 ext4_msg(sb, KERN_ERR, "error: journal path %s "
1574 "is not a block device", journal_path); 1574 "is not a block device", journal_path);
@@ -5199,7 +5199,7 @@ static int ext4_write_info(struct super_block *sb, int type)
5199 handle_t *handle; 5199 handle_t *handle;
5200 5200
5201 /* Data block + inode block */ 5201 /* Data block + inode block */
5202 handle = ext4_journal_start(sb->s_root->d_inode, EXT4_HT_QUOTA, 2); 5202 handle = ext4_journal_start(d_inode(sb->s_root), EXT4_HT_QUOTA, 2);
5203 if (IS_ERR(handle)) 5203 if (IS_ERR(handle))
5204 return PTR_ERR(handle); 5204 return PTR_ERR(handle);
5205 ret = dquot_commit_info(sb, type); 5205 ret = dquot_commit_info(sb, type);
@@ -5247,7 +5247,7 @@ static int ext4_quota_on(struct super_block *sb, int type, int format_id,
5247 * all updates to the file when we bypass pagecache... 5247 * all updates to the file when we bypass pagecache...
5248 */ 5248 */
5249 if (EXT4_SB(sb)->s_journal && 5249 if (EXT4_SB(sb)->s_journal &&
5250 ext4_should_journal_data(path->dentry->d_inode)) { 5250 ext4_should_journal_data(d_inode(path->dentry))) {
5251 /* 5251 /*
5252 * We don't need to lock updates but journal_flush() could 5252 * We don't need to lock updates but journal_flush() could
5253 * otherwise be livelocked... 5253 * otherwise be livelocked...
diff --git a/fs/ext4/symlink.c b/fs/ext4/symlink.c
index ff3711932018..57f50091b8d1 100644
--- a/fs/ext4/symlink.c
+++ b/fs/ext4/symlink.c
@@ -25,7 +25,7 @@
25 25
26static void *ext4_follow_link(struct dentry *dentry, struct nameidata *nd) 26static void *ext4_follow_link(struct dentry *dentry, struct nameidata *nd)
27{ 27{
28 struct ext4_inode_info *ei = EXT4_I(dentry->d_inode); 28 struct ext4_inode_info *ei = EXT4_I(d_inode(dentry));
29 nd_set_link(nd, (char *) ei->i_data); 29 nd_set_link(nd, (char *) ei->i_data);
30 return NULL; 30 return NULL;
31} 31}
diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c
index 1e09fc77395c..19935320f7b4 100644
--- a/fs/ext4/xattr.c
+++ b/fs/ext4/xattr.c
@@ -179,7 +179,7 @@ ext4_xattr_handler(int name_index)
179/* 179/*
180 * Inode operation listxattr() 180 * Inode operation listxattr()
181 * 181 *
182 * dentry->d_inode->i_mutex: don't care 182 * d_inode(dentry)->i_mutex: don't care
183 */ 183 */
184ssize_t 184ssize_t
185ext4_listxattr(struct dentry *dentry, char *buffer, size_t size) 185ext4_listxattr(struct dentry *dentry, char *buffer, size_t size)
@@ -424,7 +424,7 @@ ext4_xattr_list_entries(struct dentry *dentry, struct ext4_xattr_entry *entry,
424static int 424static int
425ext4_xattr_block_list(struct dentry *dentry, char *buffer, size_t buffer_size) 425ext4_xattr_block_list(struct dentry *dentry, char *buffer, size_t buffer_size)
426{ 426{
427 struct inode *inode = dentry->d_inode; 427 struct inode *inode = d_inode(dentry);
428 struct buffer_head *bh = NULL; 428 struct buffer_head *bh = NULL;
429 int error; 429 int error;
430 struct mb_cache *ext4_mb_cache = EXT4_GET_MB_CACHE(inode); 430 struct mb_cache *ext4_mb_cache = EXT4_GET_MB_CACHE(inode);
@@ -461,7 +461,7 @@ cleanup:
461static int 461static int
462ext4_xattr_ibody_list(struct dentry *dentry, char *buffer, size_t buffer_size) 462ext4_xattr_ibody_list(struct dentry *dentry, char *buffer, size_t buffer_size)
463{ 463{
464 struct inode *inode = dentry->d_inode; 464 struct inode *inode = d_inode(dentry);
465 struct ext4_xattr_ibody_header *header; 465 struct ext4_xattr_ibody_header *header;
466 struct ext4_inode *raw_inode; 466 struct ext4_inode *raw_inode;
467 struct ext4_iloc iloc; 467 struct ext4_iloc iloc;
@@ -502,7 +502,7 @@ ext4_xattr_list(struct dentry *dentry, char *buffer, size_t buffer_size)
502{ 502{
503 int ret, ret2; 503 int ret, ret2;
504 504
505 down_read(&EXT4_I(dentry->d_inode)->xattr_sem); 505 down_read(&EXT4_I(d_inode(dentry))->xattr_sem);
506 ret = ret2 = ext4_xattr_ibody_list(dentry, buffer, buffer_size); 506 ret = ret2 = ext4_xattr_ibody_list(dentry, buffer, buffer_size);
507 if (ret < 0) 507 if (ret < 0)
508 goto errout; 508 goto errout;
@@ -515,7 +515,7 @@ ext4_xattr_list(struct dentry *dentry, char *buffer, size_t buffer_size)
515 goto errout; 515 goto errout;
516 ret += ret2; 516 ret += ret2;
517errout: 517errout:
518 up_read(&EXT4_I(dentry->d_inode)->xattr_sem); 518 up_read(&EXT4_I(d_inode(dentry))->xattr_sem);
519 return ret; 519 return ret;
520} 520}
521 521
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