]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[XFS] Catch log unmount failures.
authorDavid Chinner <dgc@sgi.com>
Thu, 10 Apr 2008 02:24:38 +0000 (12:24 +1000)
committerLachlan McIlroy <lachlan@redback.melbourne.sgi.com>
Fri, 18 Apr 2008 02:02:30 +0000 (12:02 +1000)
Unmounting the log can fail. unlikely, but it can. Catch all the error
conditions an make sure it's propagated upwards.

SGI-PV: 980084
SGI-Modid: xfs-linux-melb:xfs-kern:30833a

Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Niv Sardi <xaiki@sgi.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
fs/xfs/xfs_log.c

index e29ea0a6d767f0b852a4783d15d28765fa32b63f..afaee301b0ee1fa2e1c491f5bd2109ed277fabf1 100644 (file)
@@ -697,7 +697,7 @@ xfs_log_unmount_write(xfs_mount_t *mp)
                atomic_inc(&iclog->ic_refcnt);
                spin_unlock(&log->l_icloglock);
                xlog_state_want_sync(log, iclog);
-               (void) xlog_state_release_iclog(log, iclog);
+               error = xlog_state_release_iclog(log, iclog);
 
                spin_lock(&log->l_icloglock);
                if (!(iclog->ic_state == XLOG_STATE_ACTIVE ||
@@ -736,7 +736,7 @@ xfs_log_unmount_write(xfs_mount_t *mp)
                spin_unlock(&log->l_icloglock);
 
                xlog_state_want_sync(log, iclog);
-               (void) xlog_state_release_iclog(log, iclog);
+               error =  xlog_state_release_iclog(log, iclog);
 
                spin_lock(&log->l_icloglock);
 
@@ -751,7 +751,7 @@ xfs_log_unmount_write(xfs_mount_t *mp)
                }
        }
 
-       return 0;
+       return error;
 }      /* xfs_log_unmount_write */
 
 /*