]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/xfs/xfs_fsops.c
[PATCH] proc: Use sane permission checks on the /proc/<pid>/fd/ symlinks
[linux-2.6-omap-h63xx.git] / fs / xfs / xfs_fsops.c
index b4d971b01588954d2bf59a49346fe4dc98d0a9ee..077629bab532eca4cd147b8d2a1f0cd4a6ceba44 100644 (file)
 #include "xfs_trans.h"
 #include "xfs_sb.h"
 #include "xfs_ag.h"
-#include "xfs_dir.h"
 #include "xfs_dir2.h"
 #include "xfs_dmapi.h"
 #include "xfs_mount.h"
 #include "xfs_bmap_btree.h"
 #include "xfs_alloc_btree.h"
 #include "xfs_ialloc_btree.h"
-#include "xfs_dir_sf.h"
 #include "xfs_dir2_sf.h"
 #include "xfs_attr_sf.h"
 #include "xfs_dinode.h"
@@ -462,6 +460,7 @@ xfs_fs_counts(
 {
        unsigned long   s;
 
+       xfs_icsb_sync_counters_lazy(mp);
        s = XFS_SB_LOCK(mp);
        cnt->freedata = mp->m_sb.sb_fdblocks;
        cnt->freertx = mp->m_sb.sb_frextents;
@@ -476,7 +475,7 @@ xfs_fs_counts(
  *
  * xfs_reserve_blocks is called to set m_resblks
  * in the in-core mount table. The number of unused reserved blocks
- * is kept in m_resbls_avail.
+ * is kept in m_resblks_avail.
  *
  * Reserve the requested number of blocks if available. Otherwise return
  * as many as possible to satisfy the request. The actual number
@@ -541,14 +540,13 @@ xfs_reserve_blocks(
 }
 
 void
-xfs_fs_log_dummy(xfs_mount_t *mp)
+xfs_fs_log_dummy(
+       xfs_mount_t     *mp)
 {
-       xfs_trans_t *tp;
-       xfs_inode_t *ip;
-
+       xfs_trans_t     *tp;
+       xfs_inode_t     *ip;
 
        tp = _xfs_trans_alloc(mp, XFS_TRANS_DUMMY1);
-       atomic_inc(&mp->m_active_trans);
        if (xfs_trans_reserve(tp, 0, XFS_ICHANGE_LOG_RES(mp), 0, 0, 0)) {
                xfs_trans_cancel(tp, 0);
                return;
@@ -573,21 +571,22 @@ xfs_fs_goingdown(
 {
        switch (inflags) {
        case XFS_FSOP_GOING_FLAGS_DEFAULT: {
-               struct vfs *vfsp = XFS_MTOVFS(mp);
+               struct bhv_vfs *vfsp = XFS_MTOVFS(mp);
                struct super_block *sb = freeze_bdev(vfsp->vfs_super->s_bdev);
 
                if (sb && !IS_ERR(sb)) {
-                       xfs_force_shutdown(mp, XFS_FORCE_UMOUNT);
+                       xfs_force_shutdown(mp, SHUTDOWN_FORCE_UMOUNT);
                        thaw_bdev(sb->s_bdev, sb);
                }
        
                break;
        }
        case XFS_FSOP_GOING_FLAGS_LOGFLUSH:
-               xfs_force_shutdown(mp, XFS_FORCE_UMOUNT);
+               xfs_force_shutdown(mp, SHUTDOWN_FORCE_UMOUNT);
                break;
        case XFS_FSOP_GOING_FLAGS_NOLOGFLUSH:
-               xfs_force_shutdown(mp, XFS_FORCE_UMOUNT|XFS_LOG_IO_ERROR);
+               xfs_force_shutdown(mp,
+                               SHUTDOWN_FORCE_UMOUNT | SHUTDOWN_LOG_IO_ERROR);
                break;
        default:
                return XFS_ERROR(EINVAL);