Skip to content

Commit

Permalink
hfs: atomically read inode size
Browse files Browse the repository at this point in the history
See i_size_read() comments in include/linux/fs.h

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Fabian Frederick <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Fabian Frederick authored and torvalds committed Feb 28, 2017
1 parent b279ddc commit 8d85063
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/hfs/mdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 8d85063

Please sign in to comment.