diff options
author | Fabian Frederick <fabf@skynet.be> | 2017-02-27 23:30:19 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-02-28 03:43:48 +0100 |
commit | 8d85063adbb1eb3d168e226fef96995391462c20 (patch) | |
tree | 61f95cfd5a6930e000c3574a793c94129c20c625 /fs/hfs | |
parent | mm: clarify mm_struct.mm_{users,count} documentation (diff) | |
download | linux-8d85063adbb1eb3d168e226fef96995391462c20.tar.xz linux-8d85063adbb1eb3d168e226fef96995391462c20.zip |
hfs: atomically read inode size
See i_size_read() comments in include/linux/fs.h
Link: http://lkml.kernel.org/r/20170123175245.3272-1-fabf@skynet.be
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/hfs')
-rw-r--r-- | fs/hfs/mdb.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/hfs/mdb.c b/fs/hfs/mdb.c index a3ec3ae7d347..482081bcdf70 100644 --- a/fs/hfs/mdb.c +++ b/fs/hfs/mdb.c @@ -38,7 +38,7 @@ static int hfs_get_last_session(struct super_block *sb, /* default values */ *start = 0; - *size = sb->s_bdev->bd_inode->i_size >> 9; + *size = i_size_read(sb->s_bdev->bd_inode) >> 9; if (HFS_SB(sb)->session >= 0) { te.cdte_track = HFS_SB(sb)->session; |