summaryrefslogtreecommitdiff
path: root/fs/jfs/super.c
diff options
context:
space:
mode:
authorFabian Frederick <fabf@skynet.be>2017-01-23 20:50:23 +0300
committerDave Kleikamp <dave.kleikamp@oracle.com>2017-02-09 20:57:22 +0300
commit684666e51585f3b136a3f505f8173d7580bc52cd (patch)
treefa28b4c0594e36ac6f739de779e1711d64f6e152 /fs/jfs/super.c
parentd966564fcdc19e13eb6ba1fbe6b8101070339c3d (diff)
downloadlinux-684666e51585f3b136a3f505f8173d7580bc52cd.tar.xz
jfs: atomically read inode size
See i_size_read() comments in include/linux/fs.h Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Diffstat (limited to 'fs/jfs/super.c')
-rw-r--r--fs/jfs/super.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/jfs/super.c b/fs/jfs/super.c
index 2be7c9ce6663..51881eb8ccff 100644
--- a/fs/jfs/super.c
+++ b/fs/jfs/super.c
@@ -283,7 +283,7 @@ static int parse_options(char *options, struct super_block *sb, s64 *newLVSize,
}
case Opt_resize_nosize:
{
- *newLVSize = sb->s_bdev->bd_inode->i_size >>
+ *newLVSize = i_size_read(sb->s_bdev->bd_inode) >>
sb->s_blocksize_bits;
if (*newLVSize == 0)
pr_err("JFS: Cannot determine volume size\n");
@@ -549,7 +549,7 @@ static int jfs_fill_super(struct super_block *sb, void *data, int silent)
goto out_unload;
}
inode->i_ino = 0;
- inode->i_size = sb->s_bdev->bd_inode->i_size;
+ inode->i_size = i_size_read(sb->s_bdev->bd_inode);
inode->i_mapping->a_ops = &jfs_metapage_aops;
hlist_add_fake(&inode->i_hash);
mapping_set_gfp_mask(inode->i_mapping, GFP_NOFS);