diff options
author | Fabian Frederick <fabf@skynet.be> | 2017-01-23 18:50:23 +0100 |
---|---|---|
committer | Dave Kleikamp <dave.kleikamp@oracle.com> | 2017-02-09 11:57:22 -0600 |
commit | 684666e51585f3b136a3f505f8173d7580bc52cd (patch) | |
tree | fa28b4c0594e36ac6f739de779e1711d64f6e152 /fs/jfs/resize.c | |
parent | d966564fcdc19e13eb6ba1fbe6b8101070339c3d (diff) | |
download | op-kernel-dev-684666e51585f3b136a3f505f8173d7580bc52cd.zip op-kernel-dev-684666e51585f3b136a3f505f8173d7580bc52cd.tar.gz |
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/resize.c')
-rw-r--r-- | fs/jfs/resize.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/jfs/resize.c b/fs/jfs/resize.c index bd9b641..7ddcb44 100644 --- a/fs/jfs/resize.c +++ b/fs/jfs/resize.c @@ -98,7 +98,7 @@ int jfs_extendfs(struct super_block *sb, s64 newLVSize, int newLogSize) goto out; } - VolumeSize = sb->s_bdev->bd_inode->i_size >> sb->s_blocksize_bits; + VolumeSize = i_size_read(sb->s_bdev->bd_inode) >> sb->s_blocksize_bits; if (VolumeSize) { if (newLVSize > VolumeSize) { @@ -211,7 +211,7 @@ int jfs_extendfs(struct super_block *sb, s64 newLVSize, int newLogSize) txQuiesce(sb); /* Reset size of direct inode */ - sbi->direct_inode->i_size = sb->s_bdev->bd_inode->i_size; + sbi->direct_inode->i_size = i_size_read(sb->s_bdev->bd_inode); if (sbi->mntflag & JFS_INLINELOG) { /* |