All of lore.kernel.org
 help / color / mirror / Atom feed
* [Ocfs2-devel] [PATCH] Initialize unaligned I/O bit to clear
@ 2012-12-26 22:52 Goldwyn Rodrigues
  2012-12-27  2:25 ` Junxiao Bi
  0 siblings, 1 reply; 3+ messages in thread
From: Goldwyn Rodrigues @ 2012-12-26 22:52 UTC (permalink / raw)
  To: ocfs2-devel

The fields of kiocb received in ocfs2_file_aio_write can be
uninitialized/non-zero. This could result in UNALIGED_AIO bit in
iocb->private set. This causes the oi->ip_unaligned_aio to decrement,
well below zero blocking future AIO.

Clear unaligned bit to fix this.

Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.de>

---
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c
index 37d313e..d3bc462 100644
--- a/fs/ocfs2/file.c
+++ b/fs/ocfs2/file.c
@@ -2254,6 +2254,7 @@ static ssize_t ocfs2_file_aio_write(struct kiocb *iocb,

 	mutex_lock(&inode->i_mutex);

+	ocfs2_iocb_clear_unaligned_aio(iocb);
 	ocfs2_iocb_clear_sem_locked(iocb);

 relock:

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-12-27 18:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-26 22:52 [Ocfs2-devel] [PATCH] Initialize unaligned I/O bit to clear Goldwyn Rodrigues
2012-12-27  2:25 ` Junxiao Bi
2012-12-27 18:08   ` Goldwyn Rodrigues

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.