* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*
- * Copyright (c) 2011, Whamcloud, Inc.
+ * Copyright (c) 2011, 2015, Intel Corporation.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
#define DEBUG_SUBSYSTEM S_MGS
#define D_MGS D_CONFIG
-#ifdef __KERNEL__
+#include <linux/kthread.h>
#include <linux/pagemap.h>
-#endif
#include <obd.h>
#include <obd_class.h>
static int nidtbl_is_sane(struct mgs_nidtbl *tbl)
{
- struct mgs_nidtbl_target *tgt;
- int version = 0;
+ struct mgs_nidtbl_target *tgt;
+ int version = 0;
LASSERT(mutex_is_locked(&tbl->mn_lock));
- cfs_list_for_each_entry(tgt, &tbl->mn_targets, mnt_list) {
- if (!tgt->mnt_version)
- continue;
+ list_for_each_entry(tgt, &tbl->mn_targets, mnt_list) {
+ if (!tgt->mnt_version)
+ continue;
- if (version >= tgt->mnt_version)
- return 0;
+ if (version >= tgt->mnt_version)
+ return 0;
- version = tgt->mnt_version;
- }
- return 1;
+ version = tgt->mnt_version;
+ }
+ return 1;
}
/**
* shouldn't cross unit boundaries.
*/
static int mgs_nidtbl_read(struct obd_export *exp, struct mgs_nidtbl *tbl,
- struct mgs_config_res *res, cfs_page_t **pages,
+ struct mgs_config_res *res, struct page **pages,
int nrpages, int units_total, int unit_size)
{
struct mgs_nidtbl_target *tgt;
/* make sure unit_size is power 2 */
LASSERT((unit_size & (unit_size - 1)) == 0);
- LASSERT(nrpages << CFS_PAGE_SHIFT >= units_total * unit_size);
+ LASSERT(nrpages << PAGE_CACHE_SHIFT >= units_total * unit_size);
mutex_lock(&tbl->mn_lock);
LASSERT(nidtbl_is_sane(tbl));
* otherwise, it's for clients, then llog entries for both OSTs and
* MDTs will be returned.
*/
- cfs_list_for_each_entry(tgt, &tbl->mn_targets, mnt_list) {
+ list_for_each_entry(tgt, &tbl->mn_targets, mnt_list) {
int entry_len = sizeof(*entry);
if (tgt->mnt_version < version)
break;
}
- /* check if we need to consume remaining bytes. */
- if (last_in_unit != NULL && bytes_in_unit) {
-#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 6, 50, 0)
- /* May need to swab back to update the length.*/
- if (exp->exp_need_mne_swab)
- lustre_swab_mgs_nidtbl_entry(last_in_unit);
-#endif
+ /* check if we need to consume remaining bytes. */
+ if (last_in_unit != NULL && bytes_in_unit) {
last_in_unit->mne_length += bytes_in_unit;
-#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 6, 50, 0)
- if (exp->exp_need_mne_swab)
- lustre_swab_mgs_nidtbl_entry(last_in_unit);
-#endif
- rc += bytes_in_unit;
- buf += bytes_in_unit;
- last_in_unit = NULL;
- }
- LASSERT((rc & (unit_size - 1)) == 0);
-
- if (units_in_page == 0) {
- /* allocate a new page */
- pages[index] = cfs_alloc_page(CFS_ALLOC_STD);
- if (pages[index] == NULL) {
- rc = -ENOMEM;
- break;
- }
-
- /* destroy previous map */
- if (index > 0)
- cfs_kunmap(pages[index - 1]);
-
- /* reassign buffer */
- buf = cfs_kmap(pages[index]);
- ++index;
-
- units_in_page = CFS_PAGE_SIZE / unit_size;
- LASSERT(units_in_page > 0);
- }
+ rc += bytes_in_unit;
+ buf += bytes_in_unit;
+ last_in_unit = NULL;
+ }
+ LASSERT((rc & (unit_size - 1)) == 0);
+
+ if (units_in_page == 0) {
+ /* allocate a new page */
+ pages[index] = alloc_page(GFP_IOFS);
+ if (pages[index] == NULL) {
+ rc = -ENOMEM;
+ break;
+ }
+
+ /* destroy previous map */
+ if (index > 0)
+ kunmap(pages[index - 1]);
+
+ /* reassign buffer */
+ buf = kmap(pages[index]);
+ ++index;
+
+ units_in_page = PAGE_CACHE_SIZE / unit_size;
+ LASSERT(units_in_page > 0);
+ }
/* allocate an unit */
LASSERT(((long)buf & (unit_size - 1)) == 0);
entry->mne_type = tgt->mnt_type;
entry->mne_nid_type = 0;
entry->mne_nid_size = sizeof(lnet_nid_t);
- entry->mne_nid_count = mti->mti_nid_count;
- memcpy(entry->u.nids, mti->mti_nids,
- mti->mti_nid_count * sizeof(lnet_nid_t));
+ entry->mne_nid_count = mti->mti_nid_count;
+ memcpy(entry->u.nids, mti->mti_nids,
+ mti->mti_nid_count * sizeof(lnet_nid_t));
-#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 6, 50, 0)
- /* For LU-1644, swab entry for 2.2 clients. */
- if (exp->exp_need_mne_swab)
- lustre_swab_mgs_nidtbl_entry(entry);
-#endif
-
- version = tgt->mnt_version;
- rc += entry_len;
- buf += entry_len;
+ version = tgt->mnt_version;
+ rc += entry_len;
+ buf += entry_len;
bytes_in_unit -= entry_len;
last_in_unit = entry;
bytes_in_unit, index, nrpages, units_total);
}
if (index > 0)
- cfs_kunmap(pages[index - 1]);
+ kunmap(pages[index - 1]);
out:
LASSERT(version <= tbl->mn_version);
res->mcr_size = tbl->mn_version;
GOTO(out_put, rc = PTR_ERR(th));
th->th_sync = 1; /* update table synchronously */
- rc = dt_declare_record_write(env, fsdb, buf.lb_len, off, th);
+ rc = dt_declare_record_write(env, fsdb, &buf, off, th);
if (rc)
GOTO(out, rc);
}
fsdb = dt_locate_at(env, mgs->mgs_bottom, &fid,
- &mgs->mgs_dt_dev.dd_lu_dev);
+ &mgs->mgs_dt_dev.dd_lu_dev, NULL);
if (IS_ERR(fsdb))
RETURN(PTR_ERR(fsdb));
type &= ~LDD_F_SV_TYPE_MGS;
LASSERT(type != 0);
- tbl = &fsdb->fsdb_nidtbl;
+ tbl = &fsdb->fsdb_nidtbl;
mutex_lock(&tbl->mn_lock);
- cfs_list_for_each_entry(tgt, &tbl->mn_targets, mnt_list) {
- struct mgs_target_info *info = &tgt->mnt_mti;
+ list_for_each_entry(tgt, &tbl->mn_targets, mnt_list) {
+ struct mgs_target_info *info = &tgt->mnt_mti;
+
if (type == tgt->mnt_type &&
mti->mti_stripe_index == info->mti_stripe_index) {
found = true;
if (tgt == NULL)
GOTO(out, rc = -ENOMEM);
- CFS_INIT_LIST_HEAD(&tgt->mnt_list);
- tgt->mnt_fs = tbl;
- tgt->mnt_version = 0; /* 0 means invalid */
- tgt->mnt_type = type;
+ INIT_LIST_HEAD(&tgt->mnt_list);
+ tgt->mnt_fs = tbl;
+ tgt->mnt_version = 0; /* 0 means invalid */
+ tgt->mnt_type = type;
- ++tbl->mn_nr_targets;
- }
+ ++tbl->mn_nr_targets;
+ }
- tgt->mnt_version = ++tbl->mn_version;
- tgt->mnt_mti = *mti;
+ tgt->mnt_version = ++tbl->mn_version;
+ tgt->mnt_mti = *mti;
- cfs_list_move_tail(&tgt->mnt_list, &tbl->mn_targets);
+ list_move_tail(&tgt->mnt_list, &tbl->mn_targets);
rc = nidtbl_update_version(env, fsdb->fsdb_mgs, tbl);
- EXIT;
+ EXIT;
out:
mutex_unlock(&tbl->mn_lock);
static void mgs_nidtbl_fini_fs(struct fs_db *fsdb)
{
struct mgs_nidtbl *tbl = &fsdb->fsdb_nidtbl;
- CFS_LIST_HEAD(head);
+ struct list_head head = LIST_HEAD_INIT(head);
mutex_lock(&tbl->mn_lock);
tbl->mn_nr_targets = 0;
- cfs_list_splice_init(&tbl->mn_targets, &head);
+ list_splice_init(&tbl->mn_targets, &head);
mutex_unlock(&tbl->mn_lock);
- while (!cfs_list_empty(&head)) {
+ while (!list_empty(&head)) {
struct mgs_nidtbl_target *tgt;
tgt = list_entry(head.next, struct mgs_nidtbl_target, mnt_list);
- cfs_list_del(&tgt->mnt_list);
+ list_del(&tgt->mnt_list);
OBD_FREE_PTR(tgt);
}
}
struct mgs_nidtbl *tbl = &fsdb->fsdb_nidtbl;
int rc;
- CFS_INIT_LIST_HEAD(&tbl->mn_targets);
+ INIT_LIST_HEAD(&tbl->mn_targets);
mutex_init(&tbl->mn_lock);
tbl->mn_nr_targets = 0;
tbl->mn_fsdb = fsdb;
/* --------- Imperative Recovery relies on nidtbl stuff ------- */
void mgs_ir_notify_complete(struct fs_db *fsdb)
{
- struct timeval tv;
- cfs_duration_t delta;
+ struct timeval tv;
+ cfs_duration_t delta;
- cfs_atomic_set(&fsdb->fsdb_notify_phase, 0);
+ atomic_set(&fsdb->fsdb_notify_phase, 0);
/* do statistic */
fsdb->fsdb_notify_count++;
LASSERTF(sizeof(name) < 32, "name is too large to be in stack.\n");
sprintf(name, "mgs_%s_notify", fsdb->fsdb_name);
- cfs_daemonize(name);
complete(&fsdb->fsdb_notify_comp);
set_user_nice(current, -2);
- mgc_fsname2resid(fsdb->fsdb_name, &resid, CONFIG_T_RECOVER);
- while (1) {
- struct l_wait_info lwi = { 0 };
+ mgc_fsname2resid(fsdb->fsdb_name, &resid, CONFIG_T_RECOVER);
+ while (1) {
+ struct l_wait_info lwi = { 0 };
- l_wait_event(fsdb->fsdb_notify_waitq,
- fsdb->fsdb_notify_stop ||
- cfs_atomic_read(&fsdb->fsdb_notify_phase),
- &lwi);
- if (fsdb->fsdb_notify_stop)
- break;
+ l_wait_event(fsdb->fsdb_notify_waitq,
+ fsdb->fsdb_notify_stop ||
+ atomic_read(&fsdb->fsdb_notify_phase),
+ &lwi);
+ if (fsdb->fsdb_notify_stop)
+ break;
- CDEBUG(D_MGS, "%s woken up, phase is %d\n",
- name, cfs_atomic_read(&fsdb->fsdb_notify_phase));
+ CDEBUG(D_MGS, "%s woken up, phase is %d\n",
+ name, atomic_read(&fsdb->fsdb_notify_phase));
- fsdb->fsdb_notify_start = cfs_time_current();
+ fsdb->fsdb_notify_start = cfs_time_current();
mgs_revoke_lock(fsdb->fsdb_mgs, fsdb, CONFIG_T_RECOVER);
- }
+ }
complete(&fsdb->fsdb_notify_comp);
- return 0;
+ return 0;
}
int mgs_ir_init_fs(const struct lu_env *env, struct mgs_device *mgs,
struct fs_db *fsdb)
{
- int rc;
+ struct task_struct *task;
- if (!ir_timeout)
- ir_timeout = OBD_IR_MGS_TIMEOUT;
+ if (!ir_timeout)
+ ir_timeout = OBD_IR_MGS_TIMEOUT;
- fsdb->fsdb_ir_state = IR_FULL;
- if (cfs_time_before(cfs_time_current_sec(),
- mgs->mgs_start_time + ir_timeout))
- fsdb->fsdb_ir_state = IR_STARTUP;
- fsdb->fsdb_nonir_clients = 0;
- CFS_INIT_LIST_HEAD(&fsdb->fsdb_clients);
+ fsdb->fsdb_ir_state = IR_FULL;
+ if (cfs_time_before(cfs_time_current_sec(),
+ mgs->mgs_start_time + ir_timeout))
+ fsdb->fsdb_ir_state = IR_STARTUP;
+ fsdb->fsdb_nonir_clients = 0;
+ INIT_LIST_HEAD(&fsdb->fsdb_clients);
- /* start notify thread */
+ /* start notify thread */
fsdb->fsdb_mgs = mgs;
- cfs_atomic_set(&fsdb->fsdb_notify_phase, 0);
- cfs_waitq_init(&fsdb->fsdb_notify_waitq);
+ atomic_set(&fsdb->fsdb_notify_phase, 0);
+ init_waitqueue_head(&fsdb->fsdb_notify_waitq);
init_completion(&fsdb->fsdb_notify_comp);
- rc = cfs_create_thread(mgs_ir_notify, fsdb, CFS_DAEMON_FLAGS);
- if (rc > 0)
+
+ task = kthread_run(mgs_ir_notify, fsdb,
+ "mgs_%s_notify", fsdb->fsdb_name);
+ if (!IS_ERR(task))
wait_for_completion(&fsdb->fsdb_notify_comp);
- else
- CERROR("Start notify thread error %d\n", rc);
+ else
+ CERROR("Start notify thread error %ld\n", PTR_ERR(task));
mgs_nidtbl_init_fs(env, fsdb);
- return 0;
+ return 0;
}
void mgs_ir_fini_fs(struct mgs_device *mgs, struct fs_db *fsdb)
{
if (test_bit(FSDB_MGS_SELF, &fsdb->fsdb_flags))
- return;
+ return;
- mgs_fsc_cleanup_by_fsdb(fsdb);
+ mgs_fsc_cleanup_by_fsdb(fsdb);
- mgs_nidtbl_fini_fs(fsdb);
+ mgs_nidtbl_fini_fs(fsdb);
- LASSERT(cfs_list_empty(&fsdb->fsdb_clients));
+ LASSERT(list_empty(&fsdb->fsdb_clients));
- fsdb->fsdb_notify_stop = 1;
- cfs_waitq_signal(&fsdb->fsdb_notify_waitq);
+ fsdb->fsdb_notify_stop = 1;
+ wake_up(&fsdb->fsdb_notify_waitq);
wait_for_completion(&fsdb->fsdb_notify_comp);
}
}
mutex_unlock(&fsdb->fsdb_mutex);
- LASSERT(ergo(mti->mti_flags & LDD_F_IR_CAPABLE, notify));
- if (notify) {
- CDEBUG(D_MGS, "Try to revoke recover lock of %s\n",
- fsdb->fsdb_name);
- cfs_atomic_inc(&fsdb->fsdb_notify_phase);
- cfs_waitq_signal(&fsdb->fsdb_notify_waitq);
- }
- return 0;
+ LASSERT(ergo(mti->mti_flags & LDD_F_IR_CAPABLE, notify));
+ if (notify) {
+ CDEBUG(D_MGS, "Try to revoke recover lock of %s\n",
+ fsdb->fsdb_name);
+ atomic_inc(&fsdb->fsdb_notify_phase);
+ wake_up(&fsdb->fsdb_notify_waitq);
+ }
+ return 0;
}
/* NID table can be cached by two entities: Clients and MDTs */
int bytes;
int page_count;
int nrpages;
- cfs_page_t **pages = NULL;
+ struct page **pages = NULL;
ENTRY;
body = req_capsule_client_get(&req->rq_pill, &RMF_MGS_CONFIG_BODY);
RETURN(rc);
bufsize = body->mcb_units << body->mcb_bits;
- nrpages = (bufsize + CFS_PAGE_SIZE - 1) >> CFS_PAGE_SHIFT;
+ nrpages = (bufsize + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT;
if (nrpages > PTLRPC_MAX_BRW_PAGES)
RETURN(-EINVAL);
if (pages == NULL)
RETURN(-ENOMEM);
- rc = req_capsule_server_pack(&req->rq_pill);
- if (rc)
- GOTO(out, rc);
-
res = req_capsule_server_get(&req->rq_pill, &RMF_MGS_CONFIG_RES);
if (res == NULL)
GOTO(out, rc = -EINVAL);
res->mcr_offset = body->mcb_offset;
- unit_size = min_t(int, 1 << body->mcb_bits, CFS_PAGE_SIZE);
+ unit_size = min_t(int, 1 << body->mcb_bits, PAGE_CACHE_SIZE);
bytes = mgs_nidtbl_read(req->rq_export, &fsdb->fsdb_nidtbl, res,
pages, nrpages, bufsize / unit_size, unit_size);
- if (bytes < 0)
- GOTO(out, rc = bytes);
-
- /* start bulk transfer */
- page_count = (bytes + CFS_PAGE_SIZE - 1) >> CFS_PAGE_SHIFT;
- LASSERT(page_count <= nrpages);
- desc = ptlrpc_prep_bulk_exp(req, page_count,
- BULK_PUT_SOURCE, MGS_BULK_PORTAL);
- if (desc == NULL)
- GOTO(out, rc = -ENOMEM);
-
- for (i = 0; i < page_count && bytes > 0; i++) {
- ptlrpc_prep_bulk_page_pin(desc, pages[i], 0,
- min_t(int, bytes, CFS_PAGE_SIZE));
- bytes -= CFS_PAGE_SIZE;
+ if (bytes < 0)
+ GOTO(out, rc = bytes);
+
+ /* start bulk transfer */
+ page_count = (bytes + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT;
+ LASSERT(page_count <= nrpages);
+ desc = ptlrpc_prep_bulk_exp(req, page_count, 1,
+ PTLRPC_BULK_PUT_SOURCE |
+ PTLRPC_BULK_BUF_KIOV,
+ MGS_BULK_PORTAL,
+ &ptlrpc_bulk_kiov_pin_ops);
+ if (desc == NULL)
+ GOTO(out, rc = -ENOMEM);
+
+ for (i = 0; i < page_count && bytes > 0; i++) {
+ desc->bd_frag_ops->add_kiov_frag(desc, pages[i], 0,
+ min_t(int, bytes,
+ PAGE_CACHE_SIZE));
+ bytes -= PAGE_CACHE_SIZE;
}
rc = target_bulk_io(req->rq_export, desc, &lwi);
- ptlrpc_free_bulk_pin(desc);
+ ptlrpc_free_bulk(desc);
out:
for (i = 0; i < nrpages; i++) {
if (pages[i] == NULL)
break;
- cfs_free_page(pages[i]);
+ __free_page(pages[i]);
}
OBD_FREE(pages, sizeof(*pages) * nrpages);
return rc;
{ "0", 1, lprocfs_ir_clear_stats }
};
-int lprocfs_wr_ir_state(struct file *file, const char *buffer,
- unsigned long count, void *data)
+int lprocfs_wr_ir_state(struct file *file, const char __user *buffer,
+ size_t count, void *data)
{
struct fs_db *fsdb = data;
char *kbuf;
char *ptr;
int rc = 0;
- if (count > CFS_PAGE_SIZE)
- return -EINVAL;
+ if (count == 0 || count >= PAGE_CACHE_SIZE)
+ return -EINVAL;
- OBD_ALLOC(kbuf, count + 1);
- if (kbuf == NULL)
- return -ENOMEM;
+ OBD_ALLOC(kbuf, count + 1);
+ if (kbuf == NULL)
+ return -ENOMEM;
- if (copy_from_user(kbuf, buffer, count)) {
- OBD_FREE(kbuf, count);
- return -EFAULT;
- }
+ if (copy_from_user(kbuf, buffer, count)) {
+ OBD_FREE(kbuf, count + 1);
+ return -EFAULT;
+ }
kbuf[count] = 0; /* buffer is supposed to end with 0 */
if (kbuf[count - 1] == '\n')
return 0;
}
-int lprocfs_rd_ir_timeout(char *page, char **start, off_t off, int count,
- int *eof, void *data)
+int lprocfs_ir_timeout_seq_show(struct seq_file *m, void *data)
{
- *eof = 1;
- return snprintf(page, count, "%d\n", ir_timeout);
+ return lprocfs_uint_seq_show(m, &ir_timeout);
}
-int lprocfs_wr_ir_timeout(struct file *file, const char *buffer,
- unsigned long count, void *data)
+ssize_t lprocfs_ir_timeout_seq_write(struct file *file,
+ const char __user *buffer,
+ size_t count, loff_t *off)
{
return lprocfs_wr_uint(file, buffer, count, &ir_timeout);
}
if (new_fsc == NULL)
RETURN(-ENOMEM);
- CFS_INIT_LIST_HEAD(&new_fsc->mfc_export_list);
- CFS_INIT_LIST_HEAD(&new_fsc->mfc_fsdb_list);
- new_fsc->mfc_fsdb = fsdb;
- new_fsc->mfc_export = class_export_get(exp);
- new_fsc->mfc_ir_capable =
- !!(exp->exp_connect_flags & OBD_CONNECT_IMP_RECOV);
+ INIT_LIST_HEAD(&new_fsc->mfc_export_list);
+ INIT_LIST_HEAD(&new_fsc->mfc_fsdb_list);
+ new_fsc->mfc_fsdb = fsdb;
+ new_fsc->mfc_export = class_export_get(exp);
+ new_fsc->mfc_ir_capable = !!(exp_connect_flags(exp) &
+ OBD_CONNECT_IMP_RECOV);
- rc = -EEXIST;
+ rc = -EEXIST;
mutex_lock(&fsdb->fsdb_mutex);
/* tend to find it in export list because this list is shorter. */
spin_lock(&data->med_lock);
- cfs_list_for_each_entry(fsc, &data->med_clients, mfc_export_list) {
+ list_for_each_entry(fsc, &data->med_clients, mfc_export_list) {
if (strcmp(fsname, fsc->mfc_fsdb->fsdb_name) == 0) {
found = true;
break;
new_fsc = NULL;
/* add it into export list. */
- cfs_list_add(&fsc->mfc_export_list, &data->med_clients);
+ list_add(&fsc->mfc_export_list, &data->med_clients);
/* add into fsdb list. */
- cfs_list_add(&fsc->mfc_fsdb_list, &fsdb->fsdb_clients);
+ list_add(&fsc->mfc_fsdb_list, &fsdb->fsdb_clients);
if (!fsc->mfc_ir_capable) {
++fsdb->fsdb_nonir_clients;
if (fsdb->fsdb_ir_state == IR_FULL)
{
struct mgs_export_data *data = &exp->u.eu_mgs_data;
struct mgs_fsc *fsc, *tmp;
- CFS_LIST_HEAD(head);
+ struct list_head head = LIST_HEAD_INIT(head);
spin_lock(&data->med_lock);
- cfs_list_splice_init(&data->med_clients, &head);
+ list_splice_init(&data->med_clients, &head);
spin_unlock(&data->med_lock);
- cfs_list_for_each_entry_safe(fsc, tmp, &head, mfc_export_list) {
+ list_for_each_entry_safe(fsc, tmp, &head, mfc_export_list) {
struct fs_db *fsdb = fsc->mfc_fsdb;
LASSERT(fsc->mfc_export == exp);
mutex_lock(&fsdb->fsdb_mutex);
- cfs_list_del_init(&fsc->mfc_fsdb_list);
+ list_del_init(&fsc->mfc_fsdb_list);
if (fsc->mfc_ir_capable == 0) {
--fsdb->fsdb_nonir_clients;
LASSERT(fsdb->fsdb_ir_state != IR_FULL);
fsdb->fsdb_ir_state = IR_FULL;
}
mutex_unlock(&fsdb->fsdb_mutex);
- cfs_list_del_init(&fsc->mfc_export_list);
+ list_del_init(&fsc->mfc_export_list);
class_export_put(fsc->mfc_export);
OBD_FREE_PTR(fsc);
}
{
struct mgs_fsc *fsc, *tmp;
- cfs_list_for_each_entry_safe(fsc, tmp, &fsdb->fsdb_clients,
+ list_for_each_entry_safe(fsc, tmp, &fsdb->fsdb_clients,
mfc_fsdb_list) {
struct mgs_export_data *data = &fsc->mfc_export->u.eu_mgs_data;
LASSERT(fsdb == fsc->mfc_fsdb);
- cfs_list_del_init(&fsc->mfc_fsdb_list);
+ list_del_init(&fsc->mfc_fsdb_list);
spin_lock(&data->med_lock);
- cfs_list_del_init(&fsc->mfc_export_list);
+ list_del_init(&fsc->mfc_export_list);
spin_unlock(&data->med_lock);
class_export_put(fsc->mfc_export);
OBD_FREE_PTR(fsc);