/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
* vim:expandtab:shiftwidth=8:tabstop=8:
*
- * lustre/quota/quota_master.c
- * Lustre Quota Master request handler
+ * GPL HEADER START
*
- * Copyright (c) 2001-2005 Cluster File Systems, Inc.
- * Author: Niu YaWei <niu@clusterfs.com>
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * This file is part of Lustre, http://www.lustre.org.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 only,
+ * as published by the Free Software Foundation.
*
- * No redistribution or use is permitted outside of Cluster File Systems, Inc.
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License version 2 for more details (a copy is included
+ * in the LICENSE file that accompanied this code).
*
+ * You should have received a copy of the GNU General Public License
+ * version 2 along with this program; If not, see
+ * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ *
+ * GPL HEADER END
+ */
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved
+ * Use is subject to license terms.
+ */
+/*
+ * This file is part of Lustre, http://www.lustre.org/
+ * Lustre is a trademark of Sun Microsystems, Inc.
+ *
+ * lustre/quota/quota_master.c
+ *
+ * Lustre Quota Master request handler
+ *
+ * Author: Niu YaWei <niu@clusterfs.com>
*/
+
#ifndef EXPORT_SYMTAB
# define EXPORT_SYMTAB
#endif
LASSERT(lustre_dquot_cachep == NULL);
lustre_dquot_cachep = cfs_mem_cache_create("lustre_dquot_cache",
- sizeof(struct lustre_dquot),
- 0, 0);
+ sizeof(struct lustre_dquot),
+ 0, 0);
if (!lustre_dquot_cachep)
return (-ENOMEM);
for (i = 0; i < NR_DQHASH; i++) {
- INIT_LIST_HEAD(lustre_dquot_hash + i);
+ CFS_INIT_LIST_HEAD(lustre_dquot_hash + i);
}
RETURN(0);
}
if (dquot == NULL)
RETURN(NULL);
- INIT_LIST_HEAD(&dquot->dq_hash);
+ CFS_INIT_LIST_HEAD(&dquot->dq_hash);
init_mutex_locked(&dquot->dq_sem);
dquot->dq_refcnt = 1;
dquot->dq_info = lqi;
int rc = 0;
ENTRY;
- OBD_FAIL_RETURN(OBD_FAIL_OBD_DQACQ, -EIO);
+ if (OBD_FAIL_CHECK(OBD_FAIL_OBD_DQACQ))
+ RETURN(-EIO);
dquot = lustre_dqget(obd, info, qdata->qd_id, qdata_type);
if (IS_ERR(dquot))
up(&mds->mds_qonoff_sem);
continue;
}
- INIT_LIST_HEAD(&id_list);
+ CFS_INIT_LIST_HEAD(&id_list);
rc = fsfilt_qids(obd, qinfo->qi_files[type], NULL, type,
&id_list);
up(&mds->mds_qonoff_sem);