aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2016-04-10 01:33:30 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2016-04-10 17:11:51 -0400
commitfc64005c93090c052637f63578d810b037abb1a1 (patch)
tree7762f9680fd773cf265465b0e5f95e4732b90def /fs
parent04c57f4501909b60353031cfe5b991751d745658 (diff)
don't bother with ->d_inode->i_sb - it's always equal to ->d_sb
... and neither can ever be NULL Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs')
-rw-r--r--fs/9p/vfs_inode.c2
-rw-r--r--fs/btrfs/tree-log.c6
-rw-r--r--fs/cifs/cifs_dfs_ref.c2
-rw-r--r--fs/cifs/inode.c3
-rw-r--r--fs/cifs/readdir.c2
-rw-r--r--fs/cifs/xattr.c16
-rw-r--r--fs/efs/namei.c2
-rw-r--r--fs/exofs/super.c2
-rw-r--r--fs/ext2/namei.c2
-rw-r--r--fs/ext4/namei.c4
-rw-r--r--fs/f2fs/namei.c2
-rw-r--r--fs/gfs2/ops_fstype.c2
-rw-r--r--fs/gfs2/super.c2
-rw-r--r--fs/jffs2/dir.c2
-rw-r--r--fs/jffs2/super.c2
-rw-r--r--fs/jfs/namei.c2
-rw-r--r--fs/namei.c4
-rw-r--r--fs/nfs/direct.c2
-rw-r--r--fs/nfsd/nfs3proc.c4
-rw-r--r--fs/nfsd/nfs3xdr.c2
-rw-r--r--fs/nfsd/nfsfh.c2
-rw-r--r--fs/nilfs2/namei.c2
-rw-r--r--fs/ocfs2/file.c2
-rw-r--r--fs/udf/namei.c2
-rw-r--r--fs/ufs/super.c2
25 files changed, 33 insertions, 42 deletions
diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c
index 3a08b3e6ff1d..f4645c515262 100644
--- a/fs/9p/vfs_inode.c
+++ b/fs/9p/vfs_inode.c
@@ -1071,7 +1071,7 @@ v9fs_vfs_getattr(struct vfsmount *mnt, struct dentry *dentry,
1071 if (IS_ERR(st)) 1071 if (IS_ERR(st))
1072 return PTR_ERR(st); 1072 return PTR_ERR(st);
1073 1073
1074 v9fs_stat2inode(st, d_inode(dentry), d_inode(dentry)->i_sb); 1074 v9fs_stat2inode(st, d_inode(dentry), dentry->d_sb);
1075 generic_fillattr(d_inode(dentry), stat); 1075 generic_fillattr(d_inode(dentry), stat);
1076 1076
1077 p9stat_free(st); 1077 p9stat_free(st);
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c
index 24d03c751149..a82e20ecbee1 100644
--- a/fs/btrfs/tree-log.c
+++ b/fs/btrfs/tree-log.c
@@ -4851,7 +4851,7 @@ static noinline int check_parent_dirs_for_sync(struct btrfs_trans_handle *trans,
4851 goto out; 4851 goto out;
4852 4852
4853 if (!S_ISDIR(inode->i_mode)) { 4853 if (!S_ISDIR(inode->i_mode)) {
4854 if (!parent || d_really_is_negative(parent) || sb != d_inode(parent)->i_sb) 4854 if (!parent || d_really_is_negative(parent) || sb != parent->d_sb)
4855 goto out; 4855 goto out;
4856 inode = d_inode(parent); 4856 inode = d_inode(parent);
4857 } 4857 }
@@ -4872,7 +4872,7 @@ static noinline int check_parent_dirs_for_sync(struct btrfs_trans_handle *trans,
4872 break; 4872 break;
4873 } 4873 }
4874 4874
4875 if (!parent || d_really_is_negative(parent) || sb != d_inode(parent)->i_sb) 4875 if (!parent || d_really_is_negative(parent) || sb != parent->d_sb)
4876 break; 4876 break;
4877 4877
4878 if (IS_ROOT(parent)) 4878 if (IS_ROOT(parent))
@@ -5285,7 +5285,7 @@ static int btrfs_log_inode_parent(struct btrfs_trans_handle *trans,
5285 } 5285 }
5286 5286
5287 while (1) { 5287 while (1) {
5288 if (!parent || d_really_is_negative(parent) || sb != d_inode(parent)->i_sb) 5288 if (!parent || d_really_is_negative(parent) || sb != parent->d_sb)
5289 break; 5289 break;
5290 5290
5291 inode = d_inode(parent); 5291 inode = d_inode(parent);
diff --git a/fs/cifs/cifs_dfs_ref.c b/fs/cifs/cifs_dfs_ref.c
index e956cba94338..94f2c8a9ae6d 100644
--- a/fs/cifs/cifs_dfs_ref.c
+++ b/fs/cifs/cifs_dfs_ref.c
@@ -302,7 +302,7 @@ static struct vfsmount *cifs_dfs_do_automount(struct dentry *mntpt)
302 if (full_path == NULL) 302 if (full_path == NULL)
303 goto cdda_exit; 303 goto cdda_exit;
304 304
305 cifs_sb = CIFS_SB(d_inode(mntpt)->i_sb); 305 cifs_sb = CIFS_SB(mntpt->d_sb);
306 tlink = cifs_sb_tlink(cifs_sb); 306 tlink = cifs_sb_tlink(cifs_sb);
307 if (IS_ERR(tlink)) { 307 if (IS_ERR(tlink)) {
308 mnt = ERR_CAST(tlink); 308 mnt = ERR_CAST(tlink);
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c
index aeb26dbfa1bf..4cd4705ebfad 100644
--- a/fs/cifs/inode.c
+++ b/fs/cifs/inode.c
@@ -2418,8 +2418,7 @@ cifs_setattr_exit:
2418int 2418int
2419cifs_setattr(struct dentry *direntry, struct iattr *attrs) 2419cifs_setattr(struct dentry *direntry, struct iattr *attrs)
2420{ 2420{
2421 struct inode *inode = d_inode(direntry); 2421 struct cifs_sb_info *cifs_sb = CIFS_SB(direntry->d_sb);
2422 struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb);
2423 struct cifs_tcon *pTcon = cifs_sb_master_tcon(cifs_sb); 2422 struct cifs_tcon *pTcon = cifs_sb_master_tcon(cifs_sb);
2424 2423
2425 if (pTcon->unix_ext) 2424 if (pTcon->unix_ext)
diff --git a/fs/cifs/readdir.c b/fs/cifs/readdir.c
index b30a4a6d98a0..4cfb4d9f88e2 100644
--- a/fs/cifs/readdir.c
+++ b/fs/cifs/readdir.c
@@ -78,7 +78,7 @@ cifs_prime_dcache(struct dentry *parent, struct qstr *name,
78{ 78{
79 struct dentry *dentry, *alias; 79 struct dentry *dentry, *alias;
80 struct inode *inode; 80 struct inode *inode;
81 struct super_block *sb = d_inode(parent)->i_sb; 81 struct super_block *sb = parent->d_sb;
82 struct cifs_sb_info *cifs_sb = CIFS_SB(sb); 82 struct cifs_sb_info *cifs_sb = CIFS_SB(sb);
83 83
84 cifs_dbg(FYI, "%s: for %s\n", __func__, name->name); 84 cifs_dbg(FYI, "%s: for %s\n", __func__, name->name);
diff --git a/fs/cifs/xattr.c b/fs/cifs/xattr.c
index f5dc2f0df4ad..612de933431f 100644
--- a/fs/cifs/xattr.c
+++ b/fs/cifs/xattr.c
@@ -52,9 +52,7 @@ int cifs_removexattr(struct dentry *direntry, const char *ea_name)
52 return -EIO; 52 return -EIO;
53 if (d_really_is_negative(direntry)) 53 if (d_really_is_negative(direntry))
54 return -EIO; 54 return -EIO;
55 sb = d_inode(direntry)->i_sb; 55 sb = direntry->d_sb;
56 if (sb == NULL)
57 return -EIO;
58 56
59 cifs_sb = CIFS_SB(sb); 57 cifs_sb = CIFS_SB(sb);
60 tlink = cifs_sb_tlink(cifs_sb); 58 tlink = cifs_sb_tlink(cifs_sb);
@@ -113,9 +111,7 @@ int cifs_setxattr(struct dentry *direntry, const char *ea_name,
113 return -EIO; 111 return -EIO;
114 if (d_really_is_negative(direntry)) 112 if (d_really_is_negative(direntry))
115 return -EIO; 113 return -EIO;
116 sb = d_inode(direntry)->i_sb; 114 sb = direntry->d_sb;
117 if (sb == NULL)
118 return -EIO;
119 115
120 cifs_sb = CIFS_SB(sb); 116 cifs_sb = CIFS_SB(sb);
121 tlink = cifs_sb_tlink(cifs_sb); 117 tlink = cifs_sb_tlink(cifs_sb);
@@ -248,9 +244,7 @@ ssize_t cifs_getxattr(struct dentry *direntry, const char *ea_name,
248 return -EIO; 244 return -EIO;
249 if (d_really_is_negative(direntry)) 245 if (d_really_is_negative(direntry))
250 return -EIO; 246 return -EIO;
251 sb = d_inode(direntry)->i_sb; 247 sb = direntry->d_sb;
252 if (sb == NULL)
253 return -EIO;
254 248
255 cifs_sb = CIFS_SB(sb); 249 cifs_sb = CIFS_SB(sb);
256 tlink = cifs_sb_tlink(cifs_sb); 250 tlink = cifs_sb_tlink(cifs_sb);
@@ -384,9 +378,7 @@ ssize_t cifs_listxattr(struct dentry *direntry, char *data, size_t buf_size)
384 return -EIO; 378 return -EIO;
385 if (d_really_is_negative(direntry)) 379 if (d_really_is_negative(direntry))
386 return -EIO; 380 return -EIO;
387 sb = d_inode(direntry)->i_sb; 381 sb = direntry->d_sb;
388 if (sb == NULL)
389 return -EIO;
390 382
391 cifs_sb = CIFS_SB(sb); 383 cifs_sb = CIFS_SB(sb);
392 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_XATTR) 384 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_XATTR)
diff --git a/fs/efs/namei.c b/fs/efs/namei.c
index 40ba9cc41bf7..d34a40edcdb2 100644
--- a/fs/efs/namei.c
+++ b/fs/efs/namei.c
@@ -113,7 +113,7 @@ struct dentry *efs_get_parent(struct dentry *child)
113 113
114 ino = efs_find_entry(d_inode(child), "..", 2); 114 ino = efs_find_entry(d_inode(child), "..", 2);
115 if (ino) 115 if (ino)
116 parent = d_obtain_alias(efs_iget(d_inode(child)->i_sb, ino)); 116 parent = d_obtain_alias(efs_iget(child->d_sb, ino));
117 117
118 return parent; 118 return parent;
119} 119}
diff --git a/fs/exofs/super.c b/fs/exofs/super.c
index 6658a50530a0..192373653dfb 100644
--- a/fs/exofs/super.c
+++ b/fs/exofs/super.c
@@ -958,7 +958,7 @@ static struct dentry *exofs_get_parent(struct dentry *child)
958 if (!ino) 958 if (!ino)
959 return ERR_PTR(-ESTALE); 959 return ERR_PTR(-ESTALE);
960 960
961 return d_obtain_alias(exofs_iget(d_inode(child)->i_sb, ino)); 961 return d_obtain_alias(exofs_iget(child->d_sb, ino));
962} 962}
963 963
964static struct inode *exofs_nfs_get_inode(struct super_block *sb, 964static struct inode *exofs_nfs_get_inode(struct super_block *sb,
diff --git a/fs/ext2/namei.c b/fs/ext2/namei.c
index 7a2be8f7f3c3..1a7eb49a115d 100644
--- a/fs/ext2/namei.c
+++ b/fs/ext2/namei.c
@@ -82,7 +82,7 @@ struct dentry *ext2_get_parent(struct dentry *child)
82 unsigned long ino = ext2_inode_by_name(d_inode(child), &dotdot); 82 unsigned long ino = ext2_inode_by_name(d_inode(child), &dotdot);
83 if (!ino) 83 if (!ino)
84 return ERR_PTR(-ENOENT); 84 return ERR_PTR(-ENOENT);
85 return d_obtain_alias(ext2_iget(d_inode(child)->i_sb, ino)); 85 return d_obtain_alias(ext2_iget(child->d_sb, ino));
86} 86}
87 87
88/* 88/*
diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
index 48e4b8907826..5611ec9348d7 100644
--- a/fs/ext4/namei.c
+++ b/fs/ext4/namei.c
@@ -1638,13 +1638,13 @@ struct dentry *ext4_get_parent(struct dentry *child)
1638 ino = le32_to_cpu(de->inode); 1638 ino = le32_to_cpu(de->inode);
1639 brelse(bh); 1639 brelse(bh);
1640 1640
1641 if (!ext4_valid_inum(d_inode(child)->i_sb, ino)) { 1641 if (!ext4_valid_inum(child->d_sb, ino)) {
1642 EXT4_ERROR_INODE(d_inode(child), 1642 EXT4_ERROR_INODE(d_inode(child),
1643 "bad parent inode number: %u", ino); 1643 "bad parent inode number: %u", ino);
1644 return ERR_PTR(-EFSCORRUPTED); 1644 return ERR_PTR(-EFSCORRUPTED);
1645 } 1645 }
1646 1646
1647 return d_obtain_alias(ext4_iget_normal(d_inode(child)->i_sb, ino)); 1647 return d_obtain_alias(ext4_iget_normal(child->d_sb, ino));
1648} 1648}
1649 1649
1650/* 1650/*
diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c
index 7876f1052101..db874ad3514a 100644
--- a/fs/f2fs/namei.c
+++ b/fs/f2fs/namei.c
@@ -202,7 +202,7 @@ struct dentry *f2fs_get_parent(struct dentry *child)
202 unsigned long ino = f2fs_inode_by_name(d_inode(child), &dotdot); 202 unsigned long ino = f2fs_inode_by_name(d_inode(child), &dotdot);
203 if (!ino) 203 if (!ino)
204 return ERR_PTR(-ENOENT); 204 return ERR_PTR(-ENOENT);
205 return d_obtain_alias(f2fs_iget(d_inode(child)->i_sb, ino)); 205 return d_obtain_alias(f2fs_iget(child->d_sb, ino));
206} 206}
207 207
208static int __recover_dot_dentries(struct inode *dir, nid_t pino) 208static int __recover_dot_dentries(struct inode *dir, nid_t pino)
diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c
index 49b0bff18fe3..c09c63dcd7a2 100644
--- a/fs/gfs2/ops_fstype.c
+++ b/fs/gfs2/ops_fstype.c
@@ -1360,7 +1360,7 @@ static struct dentry *gfs2_mount_meta(struct file_system_type *fs_type,
1360 return ERR_PTR(error); 1360 return ERR_PTR(error);
1361 } 1361 }
1362 s = sget(&gfs2_fs_type, test_gfs2_super, set_meta_super, flags, 1362 s = sget(&gfs2_fs_type, test_gfs2_super, set_meta_super, flags,
1363 d_inode(path.dentry)->i_sb->s_bdev); 1363 path.dentry->d_sb->s_bdev);
1364 path_put(&path); 1364 path_put(&path);
1365 if (IS_ERR(s)) { 1365 if (IS_ERR(s)) {
1366 pr_warn("gfs2 mount does not exist\n"); 1366 pr_warn("gfs2 mount does not exist\n");
diff --git a/fs/gfs2/super.c b/fs/gfs2/super.c
index f8a0cd821290..9b2ff353e45f 100644
--- a/fs/gfs2/super.c
+++ b/fs/gfs2/super.c
@@ -1176,7 +1176,7 @@ static int gfs2_statfs_i(struct gfs2_sbd *sdp, struct gfs2_statfs_change_host *s
1176 1176
1177static int gfs2_statfs(struct dentry *dentry, struct kstatfs *buf) 1177static int gfs2_statfs(struct dentry *dentry, struct kstatfs *buf)
1178{ 1178{
1179 struct super_block *sb = d_inode(dentry)->i_sb; 1179 struct super_block *sb = dentry->d_sb;
1180 struct gfs2_sbd *sdp = sb->s_fs_info; 1180 struct gfs2_sbd *sdp = sb->s_fs_info;
1181 struct gfs2_statfs_change_host sc; 1181 struct gfs2_statfs_change_host sc;
1182 int error; 1182 int error;
diff --git a/fs/jffs2/dir.c b/fs/jffs2/dir.c
index 30c4c9ebb693..7a9579e03dbb 100644
--- a/fs/jffs2/dir.c
+++ b/fs/jffs2/dir.c
@@ -241,7 +241,7 @@ static int jffs2_unlink(struct inode *dir_i, struct dentry *dentry)
241 241
242static int jffs2_link (struct dentry *old_dentry, struct inode *dir_i, struct dentry *dentry) 242static int jffs2_link (struct dentry *old_dentry, struct inode *dir_i, struct dentry *dentry)
243{ 243{
244 struct jffs2_sb_info *c = JFFS2_SB_INFO(d_inode(old_dentry)->i_sb); 244 struct jffs2_sb_info *c = JFFS2_SB_INFO(old_dentry->d_sb);
245 struct jffs2_inode_info *f = JFFS2_INODE_INFO(d_inode(old_dentry)); 245 struct jffs2_inode_info *f = JFFS2_INODE_INFO(d_inode(old_dentry));
246 struct jffs2_inode_info *dir_f = JFFS2_INODE_INFO(dir_i); 246 struct jffs2_inode_info *dir_f = JFFS2_INODE_INFO(dir_i);
247 int ret; 247 int ret;
diff --git a/fs/jffs2/super.c b/fs/jffs2/super.c
index 0a9a114bb9d1..5ef21f4c4c77 100644
--- a/fs/jffs2/super.c
+++ b/fs/jffs2/super.c
@@ -147,7 +147,7 @@ static struct dentry *jffs2_get_parent(struct dentry *child)
147 JFFS2_DEBUG("Parent of directory ino #%u is #%u\n", 147 JFFS2_DEBUG("Parent of directory ino #%u is #%u\n",
148 f->inocache->ino, pino); 148 f->inocache->ino, pino);
149 149
150 return d_obtain_alias(jffs2_iget(d_inode(child)->i_sb, pino)); 150 return d_obtain_alias(jffs2_iget(child->d_sb, pino));
151} 151}
152 152
153static const struct export_operations jffs2_export_ops = { 153static const struct export_operations jffs2_export_ops = {
diff --git a/fs/jfs/namei.c b/fs/jfs/namei.c
index 701f89370de7..8a40941ac9a6 100644
--- a/fs/jfs/namei.c
+++ b/fs/jfs/namei.c
@@ -1524,7 +1524,7 @@ struct dentry *jfs_get_parent(struct dentry *dentry)
1524 parent_ino = 1524 parent_ino =
1525 le32_to_cpu(JFS_IP(d_inode(dentry))->i_dtroot.header.idotdot); 1525 le32_to_cpu(JFS_IP(d_inode(dentry))->i_dtroot.header.idotdot);
1526 1526
1527 return d_obtain_alias(jfs_iget(d_inode(dentry)->i_sb, parent_ino)); 1527 return d_obtain_alias(jfs_iget(dentry->d_sb, parent_ino));
1528} 1528}
1529 1529
1530const struct inode_operations jfs_dir_inode_operations = { 1530const struct inode_operations jfs_dir_inode_operations = {
diff --git a/fs/namei.c b/fs/namei.c
index 3498d53de26f..c0d551fc43a0 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -2653,7 +2653,7 @@ struct dentry *lock_rename(struct dentry *p1, struct dentry *p2)
2653 return NULL; 2653 return NULL;
2654 } 2654 }
2655 2655
2656 mutex_lock(&p1->d_inode->i_sb->s_vfs_rename_mutex); 2656 mutex_lock(&p1->d_sb->s_vfs_rename_mutex);
2657 2657
2658 p = d_ancestor(p2, p1); 2658 p = d_ancestor(p2, p1);
2659 if (p) { 2659 if (p) {
@@ -2680,7 +2680,7 @@ void unlock_rename(struct dentry *p1, struct dentry *p2)
2680 inode_unlock(p1->d_inode); 2680 inode_unlock(p1->d_inode);
2681 if (p1 != p2) { 2681 if (p1 != p2) {
2682 inode_unlock(p2->d_inode); 2682 inode_unlock(p2->d_inode);
2683 mutex_unlock(&p1->d_inode->i_sb->s_vfs_rename_mutex); 2683 mutex_unlock(&p1->d_sb->s_vfs_rename_mutex);
2684 } 2684 }
2685} 2685}
2686EXPORT_SYMBOL(unlock_rename); 2686EXPORT_SYMBOL(unlock_rename);
diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c
index 7a0cfd3266e5..e5daa932b823 100644
--- a/fs/nfs/direct.c
+++ b/fs/nfs/direct.c
@@ -396,7 +396,7 @@ static void nfs_direct_complete(struct nfs_direct_req *dreq, bool write)
396static void nfs_direct_readpage_release(struct nfs_page *req) 396static void nfs_direct_readpage_release(struct nfs_page *req)
397{ 397{
398 dprintk("NFS: direct read done (%s/%llu %d@%lld)\n", 398 dprintk("NFS: direct read done (%s/%llu %d@%lld)\n",
399 d_inode(req->wb_context->dentry)->i_sb->s_id, 399 req->wb_context->dentry->d_sb->s_id,
400 (unsigned long long)NFS_FILEID(d_inode(req->wb_context->dentry)), 400 (unsigned long long)NFS_FILEID(d_inode(req->wb_context->dentry)),
401 req->wb_bytes, 401 req->wb_bytes,
402 (long long)req_offset(req)); 402 (long long)req_offset(req));
diff --git a/fs/nfsd/nfs3proc.c b/fs/nfsd/nfs3proc.c
index 51c3b06e8036..d818e4ffd79f 100644
--- a/fs/nfsd/nfs3proc.c
+++ b/fs/nfsd/nfs3proc.c
@@ -552,7 +552,7 @@ nfsd3_proc_fsinfo(struct svc_rqst * rqstp, struct nfsd_fhandle *argp,
552 * different read/write sizes for file systems known to have 552 * different read/write sizes for file systems known to have
553 * problems with large blocks */ 553 * problems with large blocks */
554 if (nfserr == 0) { 554 if (nfserr == 0) {
555 struct super_block *sb = d_inode(argp->fh.fh_dentry)->i_sb; 555 struct super_block *sb = argp->fh.fh_dentry->d_sb;
556 556
557 /* Note that we don't care for remote fs's here */ 557 /* Note that we don't care for remote fs's here */
558 if (sb->s_magic == MSDOS_SUPER_MAGIC) { 558 if (sb->s_magic == MSDOS_SUPER_MAGIC) {
@@ -588,7 +588,7 @@ nfsd3_proc_pathconf(struct svc_rqst * rqstp, struct nfsd_fhandle *argp,
588 nfserr = fh_verify(rqstp, &argp->fh, 0, NFSD_MAY_NOP); 588 nfserr = fh_verify(rqstp, &argp->fh, 0, NFSD_MAY_NOP);
589 589
590 if (nfserr == 0) { 590 if (nfserr == 0) {
591 struct super_block *sb = d_inode(argp->fh.fh_dentry)->i_sb; 591 struct super_block *sb = argp->fh.fh_dentry->d_sb;
592 592
593 /* Note that we don't care for remote fs's here */ 593 /* Note that we don't care for remote fs's here */
594 switch (sb->s_magic) { 594 switch (sb->s_magic) {
diff --git a/fs/nfsd/nfs3xdr.c b/fs/nfsd/nfs3xdr.c
index 2246454dec76..93d5853f8c99 100644
--- a/fs/nfsd/nfs3xdr.c
+++ b/fs/nfsd/nfs3xdr.c
@@ -146,7 +146,7 @@ static __be32 *encode_fsid(__be32 *p, struct svc_fh *fhp)
146 default: 146 default:
147 case FSIDSOURCE_DEV: 147 case FSIDSOURCE_DEV:
148 p = xdr_encode_hyper(p, (u64)huge_encode_dev 148 p = xdr_encode_hyper(p, (u64)huge_encode_dev
149 (d_inode(fhp->fh_dentry)->i_sb->s_dev)); 149 (fhp->fh_dentry->d_sb->s_dev));
150 break; 150 break;
151 case FSIDSOURCE_FSID: 151 case FSIDSOURCE_FSID:
152 p = xdr_encode_hyper(p, (u64) fhp->fh_export->ex_fsid); 152 p = xdr_encode_hyper(p, (u64) fhp->fh_export->ex_fsid);
diff --git a/fs/nfsd/nfsfh.c b/fs/nfsd/nfsfh.c
index c1681ce894c5..a8919444c460 100644
--- a/fs/nfsd/nfsfh.c
+++ b/fs/nfsd/nfsfh.c
@@ -426,7 +426,7 @@ static bool is_root_export(struct svc_export *exp)
426 426
427static struct super_block *exp_sb(struct svc_export *exp) 427static struct super_block *exp_sb(struct svc_export *exp)
428{ 428{
429 return d_inode(exp->ex_path.dentry)->i_sb; 429 return exp->ex_path.dentry->d_sb;
430} 430}
431 431
432static bool fsid_type_ok_for_exp(u8 fsid_type, struct svc_export *exp) 432static bool fsid_type_ok_for_exp(u8 fsid_type, struct svc_export *exp)
diff --git a/fs/nilfs2/namei.c b/fs/nilfs2/namei.c
index 7ccdb961eea9..38d67f3e25bc 100644
--- a/fs/nilfs2/namei.c
+++ b/fs/nilfs2/namei.c
@@ -457,7 +457,7 @@ static struct dentry *nilfs_get_parent(struct dentry *child)
457 457
458 root = NILFS_I(d_inode(child))->i_root; 458 root = NILFS_I(d_inode(child))->i_root;
459 459
460 inode = nilfs_iget(d_inode(child)->i_sb, root, ino); 460 inode = nilfs_iget(child->d_sb, root, ino);
461 if (IS_ERR(inode)) 461 if (IS_ERR(inode))
462 return ERR_CAST(inode); 462 return ERR_CAST(inode);
463 463
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c
index c18ab45f8d21..c6fdcbd46bba 100644
--- a/fs/ocfs2/file.c
+++ b/fs/ocfs2/file.c
@@ -1290,7 +1290,7 @@ int ocfs2_getattr(struct vfsmount *mnt,
1290 struct kstat *stat) 1290 struct kstat *stat)
1291{ 1291{
1292 struct inode *inode = d_inode(dentry); 1292 struct inode *inode = d_inode(dentry);
1293 struct super_block *sb = d_inode(dentry)->i_sb; 1293 struct super_block *sb = dentry->d_sb;
1294 struct ocfs2_super *osb = sb->s_fs_info; 1294 struct ocfs2_super *osb = sb->s_fs_info;
1295 int err; 1295 int err;
1296 1296
diff --git a/fs/udf/namei.c b/fs/udf/namei.c
index a2ba11eca995..c3e5c9679371 100644
--- a/fs/udf/namei.c
+++ b/fs/udf/namei.c
@@ -1250,7 +1250,7 @@ static struct dentry *udf_get_parent(struct dentry *child)
1250 brelse(fibh.sbh); 1250 brelse(fibh.sbh);
1251 1251
1252 tloc = lelb_to_cpu(cfi.icb.extLocation); 1252 tloc = lelb_to_cpu(cfi.icb.extLocation);
1253 inode = udf_iget(d_inode(child)->i_sb, &tloc); 1253 inode = udf_iget(child->d_sb, &tloc);
1254 if (IS_ERR(inode)) 1254 if (IS_ERR(inode))
1255 return ERR_CAST(inode); 1255 return ERR_CAST(inode);
1256 1256
diff --git a/fs/ufs/super.c b/fs/ufs/super.c
index 442fd52ebffe..f04ab232d08d 100644
--- a/fs/ufs/super.c
+++ b/fs/ufs/super.c
@@ -132,7 +132,7 @@ static struct dentry *ufs_get_parent(struct dentry *child)
132 ino = ufs_inode_by_name(d_inode(child), &dot_dot); 132 ino = ufs_inode_by_name(d_inode(child), &dot_dot);
133 if (!ino) 133 if (!ino)
134 return ERR_PTR(-ENOENT); 134 return ERR_PTR(-ENOENT);
135 return d_obtain_alias(ufs_iget(d_inode(child)->i_sb, ino)); 135 return d_obtain_alias(ufs_iget(child->d_sb, ino));
136} 136}
137 137
138static const struct export_operations ufs_export_ops = { 138static const struct export_operations ufs_export_ops = {