microblaze: fix __get_user()
[pandora-kernel.git] / fs / xfs / xfs_super.c
index 5cf06b8..90ccd1c 100644 (file)
@@ -533,9 +533,9 @@ xfs_showargs(
                seq_printf(m, "," MNTOPT_LOGBSIZE "=%dk", mp->m_logbsize >> 10);
 
        if (mp->m_logname)
-               seq_printf(m, "," MNTOPT_LOGDEV "=%s", mp->m_logname);
+               seq_show_option(m, MNTOPT_LOGDEV, mp->m_logname);
        if (mp->m_rtname)
-               seq_printf(m, "," MNTOPT_RTDEV "=%s", mp->m_rtname);
+               seq_show_option(m, MNTOPT_RTDEV, mp->m_rtname);
 
        if (mp->m_dalign > 0)
                seq_printf(m, "," MNTOPT_SUNIT "=%d",
@@ -796,8 +796,6 @@ xfs_fs_destroy_inode(
        if (is_bad_inode(inode))
                goto out_reclaim;
 
-       xfs_ioend_wait(ip);
-
        ASSERT(XFS_FORCED_SHUTDOWN(ip->i_mount) || ip->i_delayed_blks == 0);
 
        /*
@@ -837,7 +835,6 @@ xfs_fs_inode_init_once(
        inode_init_once(VFS_I(ip));
 
        /* xfs inode */
-       atomic_set(&ip->i_iocount, 0);
        atomic_set(&ip->i_pincount, 0);
        spin_lock_init(&ip->i_flags_lock);
        init_waitqueue_head(&ip->i_ipin_wait);
@@ -871,27 +868,6 @@ xfs_fs_dirty_inode(
        XFS_I(inode)->i_update_core = 1;
 }
 
-STATIC int
-xfs_log_inode(
-       struct xfs_inode        *ip)
-{
-       struct xfs_mount        *mp = ip->i_mount;
-       struct xfs_trans        *tp;
-       int                     error;
-
-       tp = xfs_trans_alloc(mp, XFS_TRANS_FSYNC_TS);
-       error = xfs_trans_reserve(tp, 0, XFS_FSYNC_TS_LOG_RES(mp), 0, 0, 0);
-       if (error) {
-               xfs_trans_cancel(tp, 0);
-               return error;
-       }
-
-       xfs_ilock(ip, XFS_ILOCK_EXCL);
-       xfs_trans_ijoin_ref(tp, ip, XFS_ILOCK_EXCL);
-       xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE);
-       return xfs_trans_commit(tp, 0);
-}
-
 STATIC int
 xfs_fs_write_inode(
        struct inode            *inode,
@@ -905,23 +881,23 @@ xfs_fs_write_inode(
 
        if (XFS_FORCED_SHUTDOWN(mp))
                return -XFS_ERROR(EIO);
-       if (!ip->i_update_core)
-               return 0;
 
-       if (wbc->sync_mode == WB_SYNC_ALL) {
+       if (wbc->sync_mode == WB_SYNC_ALL || wbc->for_kupdate) {
                /*
                 * Make sure the inode has made it it into the log.  Instead
                 * of forcing it all the way to stable storage using a
                 * synchronous transaction we let the log force inside the
                 * ->sync_fs call do that for thus, which reduces the number
-                * of synchronous log foces dramatically.
+                * of synchronous log forces dramatically.
                 */
-               xfs_ioend_wait(ip);
-               error = xfs_log_inode(ip);
+               error = xfs_log_dirty_inode(ip, NULL, 0);
                if (error)
                        goto out;
                return 0;
        } else {
+               if (!ip->i_update_core)
+                       return 0;
+
                /*
                 * We make this non-blocking if the inode is contended, return
                 * EAGAIN to indicate to the caller that they did not succeed.
@@ -1019,7 +995,7 @@ xfs_fs_put_super(
         */
        xfs_filestream_unmount(mp);
 
-       XFS_bflush(mp->m_ddev_targp);
+       xfs_flush_buftarg(mp->m_ddev_targp, 1);
 
        xfs_unmountfs(mp);
        xfs_freesb(mp);
@@ -1443,7 +1419,7 @@ xfs_fs_fill_super(
         */
        xfs_filestream_unmount(mp);
 
-       XFS_bflush(mp->m_ddev_targp);
+       xfs_flush_buftarg(mp->m_ddev_targp, 1);
 
        xfs_unmountfs(mp);
        goto out_free_sb;
@@ -1670,7 +1646,6 @@ init_xfs_fs(void)
        printk(KERN_INFO XFS_VERSION_STRING " with "
                         XFS_BUILD_OPTIONS " enabled\n");
 
-       xfs_ioend_init();
        xfs_dir_startup();
 
        error = xfs_init_zones();