mon.c (c8c23c423dec49cb439697d3dc714e1500ff1610) | mon.c (356c3eb466fd1a12afd6448d90fba3922836e5f1) |
---|---|
1/* 2 * linux/fs/lockd/mon.c 3 * 4 * The kernel statd client. 5 * 6 * Copyright (C) 1996, Olaf Kirch <okir@monad.swb.de> 7 */ 8 --- 93 unchanged lines hidden (view full) --- 102 status = -EIO; 103 if (status < 0) 104 printk(KERN_NOTICE "lockd: cannot monitor %s\n", nsm->sm_name); 105 else 106 nsm->sm_monitored = 1; 107 return status; 108} 109 | 1/* 2 * linux/fs/lockd/mon.c 3 * 4 * The kernel statd client. 5 * 6 * Copyright (C) 1996, Olaf Kirch <okir@monad.swb.de> 7 */ 8 --- 93 unchanged lines hidden (view full) --- 102 status = -EIO; 103 if (status < 0) 104 printk(KERN_NOTICE "lockd: cannot monitor %s\n", nsm->sm_name); 105 else 106 nsm->sm_monitored = 1; 107 return status; 108} 109 |
110/* 111 * Cease to monitor remote host | 110/** 111 * nsm_unmonitor - Unregister peer notification 112 * @host: pointer to nlm_host of peer to stop monitoring 113 * 114 * If this peer is monitored, this function sends an upcall to 115 * tell the local rpc.statd not to send this peer a notification 116 * when we reboot. |
112 */ | 117 */ |
113int 114nsm_unmonitor(struct nlm_host *host) | 118void nsm_unmonitor(const struct nlm_host *host) |
115{ 116 struct nsm_handle *nsm = host->h_nsmhandle; 117 struct nsm_res res; | 119{ 120 struct nsm_handle *nsm = host->h_nsmhandle; 121 struct nsm_res res; |
118 int status = 0; | 122 int status; |
119 120 if (atomic_read(&nsm->sm_count) == 1 121 && nsm->sm_monitored && !nsm->sm_sticky) { 122 dprintk("lockd: nsm_unmonitor(%s)\n", nsm->sm_name); 123 124 status = nsm_mon_unmon(nsm, SM_UNMON, &res); 125 if (status < 0) 126 printk(KERN_NOTICE "lockd: cannot unmonitor %s\n", 127 nsm->sm_name); 128 else 129 nsm->sm_monitored = 0; 130 } | 123 124 if (atomic_read(&nsm->sm_count) == 1 125 && nsm->sm_monitored && !nsm->sm_sticky) { 126 dprintk("lockd: nsm_unmonitor(%s)\n", nsm->sm_name); 127 128 status = nsm_mon_unmon(nsm, SM_UNMON, &res); 129 if (status < 0) 130 printk(KERN_NOTICE "lockd: cannot unmonitor %s\n", 131 nsm->sm_name); 132 else 133 nsm->sm_monitored = 0; 134 } |
131 return status; | |
132} 133 134/* 135 * Create NSM client for the local host 136 */ 137static struct rpc_clnt * 138nsm_create(void) 139{ --- 183 unchanged lines hidden --- | 135} 136 137/* 138 * Create NSM client for the local host 139 */ 140static struct rpc_clnt * 141nsm_create(void) 142{ --- 183 unchanged lines hidden --- |