]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
ocfs2: clear unaligned io flag when dio fails
authorJunxiao Bi <junxiao.bi@oracle.com>
Thu, 31 May 2012 01:57:17 +0000 (09:57 +0800)
committerJunxiao Bi <junxiao.bi@oracle.com>
Thu, 31 May 2012 06:50:45 +0000 (14:50 +0800)
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 <junxiao.bi@oracle.com>
fs/ocfs2/file.c

index 87bcf38dfa213e5286471adbadbc3305d66d2b89..24619d72e1a732a7eea68334ce7926f3ba81eb3c 100644 (file)
@@ -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)