diff options
author | Fabian Frederick <fabf@skynet.be> | 2017-01-06 23:54:41 +0300 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2017-01-10 13:57:34 +0300 |
commit | 23bcda112f77da278898841615c7530c3e91a537 (patch) | |
tree | eab6c30d9acceffe706831f43d5a10f20abeb02b /fs/udf/lowlevel.c | |
parent | 54bb60d53114b83473ba1c622be4cca9533b9827 (diff) | |
download | linux-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.c | 2 |
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; |