]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/xfs/linux-2.6/xfs_sync.c
[XFS] Warn on transaction in flight on read-only remount
[linux-2.6-omap-h63xx.git] / fs / xfs / linux-2.6 / xfs_sync.c
index fb5cca3df840e6811ee3d6713ed0b6cd38b5343c..a608e72fa4054c3892bfc45b17e0343d21fd31ce 100644 (file)
@@ -117,8 +117,9 @@ xfs_sync_inodes_ag(
                }
                read_unlock(&pag->pag_ici_lock);
 
-               /* bad inodes are dealt with elsewhere */
-               if (is_bad_inode(inode)) {
+               /* avoid new or bad inodes */
+               if (is_bad_inode(inode) ||
+                   xfs_iflags_test(ip, XFS_INEW)) {
                        IRELE(ip);
                        continue;
                }
@@ -132,7 +133,7 @@ xfs_sync_inodes_ag(
                        lock_flags |= XFS_IOLOCK_SHARED;
                        error = xfs_flush_pages(ip, 0, -1, fflag, FI_NONE);
                        if (flags & SYNC_IOWAIT)
-                               vn_iowait(ip);
+                               xfs_ioend_wait(ip);
                }
                xfs_ilock(ip, XFS_ILOCK_SHARED);
 
@@ -370,7 +371,11 @@ xfs_quiesce_attr(
        /* flush inodes and push all remaining buffers out to disk */
        xfs_quiesce_fs(mp);
 
-       ASSERT_ALWAYS(atomic_read(&mp->m_active_trans) == 0);
+       /*
+        * Just warn here till VFS can correctly support
+        * read-only remount without racing.
+        */
+       WARN_ON(atomic_read(&mp->m_active_trans) != 0);
 
        /* Push the superblock and write an unmount record */
        error = xfs_log_sbcount(mp, 1);
@@ -706,8 +711,6 @@ restart:
                        break;
                }
 
-               ASSERT(xfs_iflags_test(ip, (XFS_IRECLAIMABLE|XFS_IRECLAIM)));
-
                /* ignore if already under reclaim */
                if (xfs_iflags_test(ip, XFS_IRECLAIM)) {
                        read_unlock(&pag->pag_ici_lock);