diff options
Diffstat (limited to 'fs/xfs/xfs_mount.c')
-rw-r--r-- | fs/xfs/xfs_mount.c | 32 |
1 files changed, 9 insertions, 23 deletions
diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c index 55de83585e00..20c67ff57536 100644 --- a/fs/xfs/xfs_mount.c +++ b/fs/xfs/xfs_mount.c | |||
@@ -52,16 +52,11 @@ STATIC void xfs_icsb_balance_counter(xfs_mount_t *, xfs_sb_field_t, | |||
52 | int); | 52 | int); |
53 | STATIC void xfs_icsb_balance_counter_locked(xfs_mount_t *, xfs_sb_field_t, | 53 | STATIC void xfs_icsb_balance_counter_locked(xfs_mount_t *, xfs_sb_field_t, |
54 | int); | 54 | int); |
55 | STATIC int xfs_icsb_modify_counters(xfs_mount_t *, xfs_sb_field_t, | ||
56 | int64_t, int); | ||
57 | STATIC void xfs_icsb_disable_counter(xfs_mount_t *, xfs_sb_field_t); | 55 | STATIC void xfs_icsb_disable_counter(xfs_mount_t *, xfs_sb_field_t); |
58 | |||
59 | #else | 56 | #else |
60 | 57 | ||
61 | #define xfs_icsb_balance_counter(mp, a, b) do { } while (0) | 58 | #define xfs_icsb_balance_counter(mp, a, b) do { } while (0) |
62 | #define xfs_icsb_balance_counter_locked(mp, a, b) do { } while (0) | 59 | #define xfs_icsb_balance_counter_locked(mp, a, b) do { } while (0) |
63 | #define xfs_icsb_modify_counters(mp, a, b, c) do { } while (0) | ||
64 | |||
65 | #endif | 60 | #endif |
66 | 61 | ||
67 | static const struct { | 62 | static const struct { |
@@ -1843,28 +1838,19 @@ xfs_mod_incore_sb_unlocked( | |||
1843 | */ | 1838 | */ |
1844 | int | 1839 | int |
1845 | xfs_mod_incore_sb( | 1840 | xfs_mod_incore_sb( |
1846 | xfs_mount_t *mp, | 1841 | struct xfs_mount *mp, |
1847 | xfs_sb_field_t field, | 1842 | xfs_sb_field_t field, |
1848 | int64_t delta, | 1843 | int64_t delta, |
1849 | int rsvd) | 1844 | int rsvd) |
1850 | { | 1845 | { |
1851 | int status; | 1846 | int status; |
1852 | 1847 | ||
1853 | /* check for per-cpu counters */ | ||
1854 | switch (field) { | ||
1855 | #ifdef HAVE_PERCPU_SB | 1848 | #ifdef HAVE_PERCPU_SB |
1856 | case XFS_SBS_ICOUNT: | 1849 | ASSERT(field < XFS_SBS_ICOUNT || field > XFS_SBS_FDBLOCKS); |
1857 | case XFS_SBS_IFREE: | ||
1858 | case XFS_SBS_FDBLOCKS: | ||
1859 | status = xfs_icsb_modify_counters(mp, field, delta, rsvd); | ||
1860 | break; | ||
1861 | #endif | 1850 | #endif |
1862 | default: | 1851 | spin_lock(&mp->m_sb_lock); |
1863 | spin_lock(&mp->m_sb_lock); | 1852 | status = xfs_mod_incore_sb_unlocked(mp, field, delta, rsvd); |
1864 | status = xfs_mod_incore_sb_unlocked(mp, field, delta, rsvd); | 1853 | spin_unlock(&mp->m_sb_lock); |
1865 | spin_unlock(&mp->m_sb_lock); | ||
1866 | break; | ||
1867 | } | ||
1868 | 1854 | ||
1869 | return status; | 1855 | return status; |
1870 | } | 1856 | } |