Re: [PATCH 03/12] lockd: fix nsm_unmonitor return value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Nov 5, 2008, at 3:06 PM, J. Bruce Fields wrote:
Note that the only caller of nsm_unmonitor has no use for its return
value.

I noticed this too.

It might be cleaner if we passed the nsm_handle by itself as the argument to nsm_{un}monitor. h_name actually points to the name in the nsm_handle.



Signed-off-by: J. Bruce Fields <bfields@xxxxxxxxxxxxxx>
---
fs/lockd/mon.c                 |    8 +++-----
include/linux/lockd/sm_inter.h |    2 +-
2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/fs/lockd/mon.c b/fs/lockd/mon.c
index 4e7e958..480f197 100644
--- a/fs/lockd/mon.c
+++ b/fs/lockd/mon.c
@@ -97,15 +97,14 @@ nsm_monitor(struct nlm_host *host)
/*
 * Cease to monitor remote host
 */
-int
-nsm_unmonitor(struct nlm_host *host)
+void nsm_unmonitor(struct nlm_host *host)
{
	struct nsm_handle *nsm = host->h_nsmhandle;
	struct nsm_res	res;
-	int		status = 0;
+	int		status;

	if (nsm == NULL)
-		return 0;
+		return;
	host->h_nsmhandle = NULL;

	if (atomic_read(&nsm->sm_count) == 1
@@ -120,7 +119,6 @@ nsm_unmonitor(struct nlm_host *host)
			nsm->sm_monitored = 0;
	}
	nsm_release(nsm);
-	return status;
}

/*
diff --git a/include/linux/lockd/sm_inter.h b/include/linux/lockd/ sm_inter.h
index 5a5448b..b069598 100644
--- a/include/linux/lockd/sm_inter.h
+++ b/include/linux/lockd/sm_inter.h
@@ -42,7 +42,7 @@ struct nsm_res {
};

int		nsm_monitor(struct nlm_host *);
-int		nsm_unmonitor(struct nlm_host *);
+void		nsm_unmonitor(struct nlm_host *);
extern int	nsm_local_state;

#endif /* LINUX_LOCKD_SM_INTER_H */
--
1.5.5.rc1


--
Chuck Lever
chuck[dot]lever[at]oracle[dot]com



--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux