]> git.baikalelectronics.ru Git - kernel.git/commit
direct-io: submit bio after boundary buffer is added to it
authorJan Kara <jack@suse.cz>
Mon, 29 Apr 2013 22:06:18 +0000 (15:06 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 29 Apr 2013 22:54:29 +0000 (15:54 -0700)
commita048fee6ae9ac280536a96a3d75dbadab6b0133e
tree6e5bcb8d66347b7d7978c4a37f54304a0e9f18b9
parent6dddc4f7020fb92c615b585160c1841ece9cc0c4
direct-io: submit bio after boundary buffer is added to it

Currently, dio_send_cur_page() submits bio before current page and cached
sdio->cur_page is added to the bio if sdio->boundary is set.  This is
actually wrong because sdio->boundary means the current buffer is the last
one before metadata needs to be read.  So we should rather submit the bio
after the current page is added to it.

Signed-off-by: Jan Kara <jack@suse.cz>
Reported-by: Kazuya Mio <k-mio@sx.jp.nec.com>
Tested-by: Kazuya Mio <k-mio@sx.jp.nec.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/direct-io.c