From: Fabian Frederick Date: Mon, 27 Feb 2017 22:27:22 +0000 (-0800) Subject: fs/reiserfs: atomically read inode size X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b899ba7d8c71e2e1c2be281222877c7a1c2ba60d;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git fs/reiserfs: atomically read inode size See i_size_read() comments in include/linux/fs.h Link: http://lkml.kernel.org/r/20170123174701.30394-1-fabf@skynet.be Signed-off-by: Fabian Frederick Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c index e314cb30a181..feabcde0290d 100644 --- a/fs/reiserfs/super.c +++ b/fs/reiserfs/super.c @@ -1166,7 +1166,7 @@ static int reiserfs_parse_options(struct super_block *s, if (!strcmp(arg, "auto")) { /* From JFS code, to auto-get the size. */ *blocks = - s->s_bdev->bd_inode->i_size >> s-> + i_size_read(s->s_bdev->bd_inode) >> s-> s_blocksize_bits; } else { *blocks = simple_strtoul(arg, &p, 0);