diff options
author | Oleg Drokin <green@linuxhacker.ru> | 2015-09-27 16:45:38 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-09-29 04:06:17 +0200 |
commit | c860a3bd565702e45690060d047e841a7f167771 (patch) | |
tree | ef68b6c4f4a5adeff7e00c3b75b3b904929bf9f3 | |
parent | 93d3a405a168fba4450bdda793149e3cd4174736 (diff) | |
download | op-kernel-dev-c860a3bd565702e45690060d047e841a7f167771.zip op-kernel-dev-c860a3bd565702e45690060d047e841a7f167771.tar.gz |
staging/lustre/obdclass: Remove unused lprocfs_wr_evict_client
This is only used on the servers to evict clients.
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/lustre/lustre/include/lprocfs_status.h | 2 | ||||
-rw-r--r-- | drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c | 49 |
2 files changed, 0 insertions, 51 deletions
diff --git a/drivers/staging/lustre/lustre/include/lprocfs_status.h b/drivers/staging/lustre/lustre/include/lprocfs_status.h index 1b87a6a..742cb593 100644 --- a/drivers/staging/lustre/lustre/include/lprocfs_status.h +++ b/drivers/staging/lustre/lustre/include/lprocfs_status.h @@ -612,8 +612,6 @@ int lprocfs_at_hist_helper(struct seq_file *m, struct adaptive_timeout *at); int lprocfs_rd_timeouts(struct seq_file *m, void *data); int lprocfs_wr_timeouts(struct file *file, const char __user *buffer, unsigned long count, void *data); -int lprocfs_wr_evict_client(struct file *file, const char __user *buffer, - size_t count, loff_t *off); int lprocfs_wr_ping(struct file *file, const char __user *buffer, size_t count, loff_t *off); int lprocfs_wr_import(struct file *file, const char __user *buffer, diff --git a/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c b/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c index 6c41104..d66a7b8 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c +++ b/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c @@ -1207,55 +1207,6 @@ void ptlrpc_lprocfs_unregister_obd(struct obd_device *obd) } EXPORT_SYMBOL(ptlrpc_lprocfs_unregister_obd); - -#define BUFLEN (UUID_MAX + 5) - -int lprocfs_wr_evict_client(struct file *file, const char __user *buffer, - size_t count, loff_t *off) -{ - struct obd_device *obd = ((struct seq_file *)file->private_data)->private; - char *kbuf; - char *tmpbuf; - - kbuf = kzalloc(BUFLEN, GFP_NOFS); - if (!kbuf) - return -ENOMEM; - - /* - * kzalloc() will zero kbuf, but we only copy BUFLEN - 1 - * bytes into kbuf, to ensure that the string is NUL-terminated. - * UUID_MAX should include a trailing NUL already. - */ - if (copy_from_user(kbuf, buffer, - min_t(unsigned long, BUFLEN - 1, count))) { - count = -EFAULT; - goto out; - } - tmpbuf = cfs_firststr(kbuf, min_t(unsigned long, BUFLEN - 1, count)); - /* Kludge code(deadlock situation): the lprocfs lock has been held - * since the client is evicted by writing client's - * uuid/nid to procfs "evict_client" entry. However, - * obd_export_evict_by_uuid() will call ldebugfs_remove() to destroy - * the proc entries under the being destroyed export{}, so I have - * to drop the lock at first here. - * - jay, jxiong@clusterfs.com */ - class_incref(obd, __func__, current); - - if (strncmp(tmpbuf, "nid:", 4) == 0) - obd_export_evict_by_nid(obd, tmpbuf + 4); - else if (strncmp(tmpbuf, "uuid:", 5) == 0) - obd_export_evict_by_uuid(obd, tmpbuf + 5); - else - obd_export_evict_by_uuid(obd, tmpbuf); - - class_decref(obd, __func__, current); - -out: - kfree(kbuf); - return count; -} -EXPORT_SYMBOL(lprocfs_wr_evict_client); - #undef BUFLEN int lprocfs_wr_ping(struct file *file, const char __user *buffer, |