summaryrefslogtreecommitdiff
path: root/fs/udf/lowlevel.c
diff options
context:
space:
mode:
authorFabian Frederick <fabf@skynet.be>2017-01-06 23:54:41 +0300
committerJan Kara <jack@suse.cz>2017-01-10 13:57:34 +0300
commit23bcda112f77da278898841615c7530c3e91a537 (patch)
treeeab6c30d9acceffe706831f43d5a10f20abeb02b /fs/udf/lowlevel.c
parent54bb60d53114b83473ba1c622be4cca9533b9827 (diff)
downloadlinux-23bcda112f77da278898841615c7530c3e91a537.tar.xz
udf: 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: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/udf/lowlevel.c')
-rw-r--r--fs/udf/lowlevel.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/udf/lowlevel.c b/fs/udf/lowlevel.c
index 6ad5a453af97..5c7ec121990d 100644
--- a/fs/udf/lowlevel.c
+++ b/fs/udf/lowlevel.c
@@ -58,7 +58,7 @@ unsigned long udf_get_last_block(struct super_block *sb)
*/
if (ioctl_by_bdev(bdev, CDROM_LAST_WRITTEN, (unsigned long) &lblock) ||
lblock == 0)
- lblock = bdev->bd_inode->i_size >> sb->s_blocksize_bits;
+ lblock = i_size_read(bdev->bd_inode) >> sb->s_blocksize_bits;
if (lblock)
return lblock - 1;