Răsfoiți Sursa

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 <fabf@skynet.be>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Fabian Frederick 8 ani în urmă
părinte
comite
b899ba7d8c
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  1. 1 1
      fs/reiserfs/super.c

+ 1 - 1
fs/reiserfs/super.c

@@ -1166,7 +1166,7 @@ static int reiserfs_parse_options(struct super_block *s,
 			if (!strcmp(arg, "auto")) {
 			if (!strcmp(arg, "auto")) {
 				/* From JFS code, to auto-get the size. */
 				/* From JFS code, to auto-get the size. */
 				*blocks =
 				*blocks =
-				    s->s_bdev->bd_inode->i_size >> s->
+				    i_size_read(s->s_bdev->bd_inode) >> s->
 				    s_blocksize_bits;
 				    s_blocksize_bits;
 			} else {
 			} else {
 				*blocks = simple_strtoul(arg, &p, 0);
 				*blocks = simple_strtoul(arg, &p, 0);