]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/xfs/xfs_fsops.c
filesystem freeze: add error handling of write_super_lockfs/unlockfs
[linux-2.6-omap-h63xx.git] / fs / xfs / xfs_fsops.c
index 852b6d32e8d02404c2d831bd311ba7c2d85bd45b..680d0e0ec93298576f46686f219098c242e152d8 100644 (file)
@@ -595,17 +595,19 @@ out:
        return 0;
 }
 
-void
+int
 xfs_fs_log_dummy(
        xfs_mount_t     *mp)
 {
        xfs_trans_t     *tp;
        xfs_inode_t     *ip;
+       int             error;
 
        tp = _xfs_trans_alloc(mp, XFS_TRANS_DUMMY1);
-       if (xfs_trans_reserve(tp, 0, XFS_ICHANGE_LOG_RES(mp), 0, 0, 0)) {
+       error = xfs_trans_reserve(tp, 0, XFS_ICHANGE_LOG_RES(mp), 0, 0, 0);
+       if (error) {
                xfs_trans_cancel(tp, 0);
-               return;
+               return error;
        }
 
        ip = mp->m_rootip;
@@ -615,9 +617,10 @@ xfs_fs_log_dummy(
        xfs_trans_ihold(tp, ip);
        xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE);
        xfs_trans_set_sync(tp);
-       xfs_trans_commit(tp, 0);
+       error = xfs_trans_commit(tp, 0);
 
        xfs_iunlock(ip, XFS_ILOCK_EXCL);
+       return error;
 }
 
 int