From: Linus Torvalds Date: Thu, 29 Nov 2012 20:27:00 +0000 (-0800) Subject: direct-io: don't read inode->i_blkbits multiple times X-Git-Tag: v3.7-rc8~5^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ab73857e354ab9e317613cba7db714e2c12c6547;p=pandora-kernel.git direct-io: don't read inode->i_blkbits multiple times Since directio can work on a raw block device, and the block size of the device can change under it, we need to do the same thing that fs/buffer.c now does: read the block size a single time, using ACCESS_ONCE(). Reading it multiple times can get different results, which will then confuse the code because it actually encodes the i_blksize in relationship to the underlying logical blocksize. Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed