From: Junxiao Bi Date: Thu, 31 May 2012 01:57:17 +0000 (+0800) Subject: ocfs2: clear unaligned io flag when dio fails X-Git-Tag: v2.6.39-400.9.0~426^2 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=3453207bc0c692ea9d62d7185a8b841ab4fd3239;p=users%2Fjedix%2Flinux-maple.git ocfs2: clear unaligned io flag when dio fails Orabug: 14063941 The unaligned io flag is set in the kiocb when an unaligned dio is issued, it should be cleared even when the dio fails, or it may affect the following io which are using the same kiocb. Signed-off-by: Junxiao Bi --- diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c index 87bcf38dfa21..24619d72e1a7 100644 --- a/fs/ocfs2/file.c +++ b/fs/ocfs2/file.c @@ -2412,8 +2412,10 @@ out_dio: unaligned_dio = 0; } - if (unaligned_dio) + if (unaligned_dio) { + ocfs2_iocb_clear_unaligned_aio(iocb); atomic_dec(&OCFS2_I(inode)->ip_unaligned_aio); + } out: if (rw_level != -1)