202 return;
203
204 mutex_enter(&so->so_lock);
205 so->so_flag |= flag;
206 if (flag & SOACC)
207 SOTOTPI(so)->sti_atime = now;
208 if (flag & SOMOD)
209 SOTOTPI(so)->sti_mtime = now;
210 mutex_exit(&so->so_lock);
211 }
212
213 extern so_create_func_t sock_comm_create_function;
214 extern so_destroy_func_t sock_comm_destroy_function;
215 /*
216 * Init function called when sockfs is loaded.
217 */
218 int
219 sockinit(int fstype, char *name)
220 {
221 static const fs_operation_def_t sock_vfsops_template[] = {
222 NULL, NULL
223 };
224 int error;
225 major_t dev;
226 char *err_str;
227
228 error = vfs_setfsops(fstype, sock_vfsops_template, NULL);
229 if (error != 0) {
230 zcmn_err(GLOBAL_ZONEID, CE_WARN,
231 "sockinit: bad vfs ops template");
232 return (error);
233 }
234
235 error = vn_make_ops(name, socket_vnodeops_template,
236 &socket_vnodeops);
237 if (error != 0) {
238 err_str = "sockinit: bad socket vnode ops template";
239 /* vn_make_ops() does not reset socktpi_vnodeops on failure. */
240 socket_vnodeops = NULL;
241 goto failure;
242 }
|
202 return;
203
204 mutex_enter(&so->so_lock);
205 so->so_flag |= flag;
206 if (flag & SOACC)
207 SOTOTPI(so)->sti_atime = now;
208 if (flag & SOMOD)
209 SOTOTPI(so)->sti_mtime = now;
210 mutex_exit(&so->so_lock);
211 }
212
213 extern so_create_func_t sock_comm_create_function;
214 extern so_destroy_func_t sock_comm_destroy_function;
215 /*
216 * Init function called when sockfs is loaded.
217 */
218 int
219 sockinit(int fstype, char *name)
220 {
221 static const fs_operation_def_t sock_vfsops_template[] = {
222 { NULL, { NULL } }
223 };
224 int error;
225 major_t dev;
226 char *err_str;
227
228 error = vfs_setfsops(fstype, sock_vfsops_template, NULL);
229 if (error != 0) {
230 zcmn_err(GLOBAL_ZONEID, CE_WARN,
231 "sockinit: bad vfs ops template");
232 return (error);
233 }
234
235 error = vn_make_ops(name, socket_vnodeops_template,
236 &socket_vnodeops);
237 if (error != 0) {
238 err_str = "sockinit: bad socket vnode ops template";
239 /* vn_make_ops() does not reset socktpi_vnodeops on failure. */
240 socket_vnodeops = NULL;
241 goto failure;
242 }
|