Commit aa6b0005 authored by Oleg Nesterov's avatar Oleg Nesterov Committed by Linus Torvalds

[PATCH] fix double sync_page_range() in generic_file_aio_write()

generic_file_aio_write():
	generic_file_aio_write_nolock():
		if (SYNC) sync_page_range_nolock();
	if (SYNC) sync_page_range();

I think that generic_file_aio_write() should use
__generic_file_aio_write_nolock() instead.
Signed-off-by: default avatarOleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent ee064e64
......@@ -2161,7 +2161,7 @@ ssize_t generic_file_aio_write(struct kiocb *iocb, const char __user *buf,
BUG_ON(iocb->ki_pos != pos);
down(&inode->i_sem);
ret = generic_file_aio_write_nolock(iocb, &local_iov, 1,
ret = __generic_file_aio_write_nolock(iocb, &local_iov, 1,
&iocb->ki_pos);
up(&inode->i_sem);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment