Print this page
7127  remove -Wno-missing-braces from Makefile.uts


 148                 } else {
 149                         return (0);
 150                 }
 151         }
 152 
 153         swapfs_desfree = new_swapfs_desfree;
 154         swapfs_minfree = new_swapfs_minfree;
 155         swapfs_reserve = new_swapfs_reserve;
 156 
 157         return (1);
 158 }
 159 
 160 /*ARGSUSED1*/
 161 int
 162 swapinit(int fstype, char *name)
 163 {                                                       /* reserve for mp */
 164         ssize_t sw_freelist_size = klustsize / PAGESIZE * 2;
 165         int i, error;
 166 
 167         static const fs_operation_def_t swap_vfsops[] = {
 168                 VFSNAME_SYNC, { .vfs_sync = swap_sync },
 169                 NULL, NULL
 170         };
 171 
 172         SWAPFS_PRINT(SWAP_SUBR, "swapinit\n", 0, 0, 0, 0, 0);
 173         mutex_init(&swapfs_lock, NULL, MUTEX_DEFAULT, NULL);
 174 
 175         swap_vnodes = kmem_zalloc(MAX_SWAP_VNODES * sizeof (struct vnode *),
 176             KM_SLEEP);
 177 
 178         swapfs_recalc_save_initial();
 179         if (!swapfs_recalc(physmem))
 180                 cmn_err(CE_PANIC, "swapfs_minfree(%lu) > physmem(%lu)",
 181                     swapfs_minfree, physmem);
 182 
 183         /*
 184          * Arrange for a callback on memory size change.
 185          */
 186         swap_init_mem_config();
 187 
 188         sw_ar = (struct async_reqs *)
 189             kmem_zalloc(sw_freelist_size*sizeof (struct async_reqs), KM_SLEEP);




 148                 } else {
 149                         return (0);
 150                 }
 151         }
 152 
 153         swapfs_desfree = new_swapfs_desfree;
 154         swapfs_minfree = new_swapfs_minfree;
 155         swapfs_reserve = new_swapfs_reserve;
 156 
 157         return (1);
 158 }
 159 
 160 /*ARGSUSED1*/
 161 int
 162 swapinit(int fstype, char *name)
 163 {                                                       /* reserve for mp */
 164         ssize_t sw_freelist_size = klustsize / PAGESIZE * 2;
 165         int i, error;
 166 
 167         static const fs_operation_def_t swap_vfsops[] = {
 168                 { VFSNAME_SYNC, { .vfs_sync = swap_sync }},
 169                 { NULL, {NULL} }
 170         };
 171 
 172         SWAPFS_PRINT(SWAP_SUBR, "swapinit\n", 0, 0, 0, 0, 0);
 173         mutex_init(&swapfs_lock, NULL, MUTEX_DEFAULT, NULL);
 174 
 175         swap_vnodes = kmem_zalloc(MAX_SWAP_VNODES * sizeof (struct vnode *),
 176             KM_SLEEP);
 177 
 178         swapfs_recalc_save_initial();
 179         if (!swapfs_recalc(physmem))
 180                 cmn_err(CE_PANIC, "swapfs_minfree(%lu) > physmem(%lu)",
 181                     swapfs_minfree, physmem);
 182 
 183         /*
 184          * Arrange for a callback on memory size change.
 185          */
 186         swap_init_mem_config();
 187 
 188         sw_ar = (struct async_reqs *)
 189             kmem_zalloc(sw_freelist_size*sizeof (struct async_reqs), KM_SLEEP);