ocfs2: Reset status if we want to restart file extension.
authorTao Ma <tao.ma@oracle.com>
Fri, 16 Apr 2010 05:59:25 +0000 (13:59 +0800)
committerJoel Becker <joel.becker@oracle.com>
Fri, 16 Apr 2010 10:10:54 +0000 (03:10 -0700)
In __ocfs2_extend_allocation, we will restart our file extension
if ((!status) && restart_func). But there is a bug that the
status is still left as -EGAIN. This is really an old bug,
but it is masked by the return value of ocfs2_journal_dirty.
So it show up when we make ocfs2_journal_dirty void.

Signed-off-by: Tao Ma <tao.ma@oracle.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
fs/ocfs2/file.c

index 2b4235c5831dc755deda87c9b0afac0e6604b821..20e0ee58dd39e7bd9c298274d4d78336bdc0e11e 100644 (file)
@@ -684,6 +684,7 @@ restarted_transaction:
                if (why == RESTART_META) {
                        mlog(0, "restarting function.\n");
                        restart_func = 1;
+                       status = 0;
                } else {
                        BUG_ON(why != RESTART_TRANS);