return list_entry(list, struct cfs_trace_page, linkage);
}
-static struct cfs_trace_page *cfs_tage_alloc(int gfp)
+static struct cfs_trace_page *cfs_tage_alloc(gfp_t gfp)
{
struct page *page;
struct cfs_trace_page *tage;
list_move_tail(&tage->linkage, queue);
}
-int cfs_trace_refill_stock(struct cfs_trace_cpu_data *tcd, int gfp,
+int cfs_trace_refill_stock(struct cfs_trace_cpu_data *tcd, gfp_t gfp,
struct list_head *stock)
{
int i;
struct cfs_trace_cpu_data *tcd;
int i, cpu;
- cfs_for_each_possible_cpu(cpu) {
+ for_each_possible_cpu(cpu) {
cfs_tcd_for_each_type_lock(tcd, i, cpu) {
list_splice_init(&tcd->tcd_pages, &pc->pc_pages);
tcd->tcd_cur_pages = 0;
struct cfs_trace_page *tmp;
int i, cpu;
- cfs_for_each_possible_cpu(cpu) {
+ for_each_possible_cpu(cpu) {
cfs_tcd_for_each_type_lock(tcd, i, cpu) {
cur_head = tcd->tcd_pages.next;
struct cfs_trace_cpu_data *tcd;
int i, cpu;
- cfs_for_each_possible_cpu(cpu) {
+ for_each_possible_cpu(cpu) {
cfs_tcd_for_each_type_lock(tcd, i, cpu)
put_pages_on_tcd_daemon_list(pc, tcd);
}
cfs_tage_free(tage);
}
MMSPACE_CLOSE;
- rc = filp_fsync(filp);
+ rc = filp_fsync(filp, 0, LLONG_MAX);
if (rc)
printk(KERN_ERR "sync returns %d\n", rc);
close:
if (rc != 0)
goto out;
-#if !defined(__WINNT__)
if (str[0] != '/') {
rc = -EINVAL;
goto out;
}
-#endif
rc = cfs_tracefile_dump_all_pages(str);
out:
cfs_trace_free_string_buffer(str, usr_str_nob + 1);
} else if (strlen(str) >= sizeof(cfs_tracefile)) {
rc = -ENAMETOOLONG;
-#ifndef __WINNT__
} else if (str[0] != '/') {
rc = -EINVAL;
-#endif
} else {
strcpy(cfs_tracefile, str);
"but wrote %d\n", tage->used, rc);
put_pages_back(&pc);
__LASSERT(list_empty(&pc.pc_pages));
+ break;
}
}
MMSPACE_CLOSE;
struct cfs_trace_page *tmp;
int i, cpu;
- cfs_for_each_possible_cpu(cpu) {
+ for_each_possible_cpu(cpu) {
cfs_tcd_for_each_type_lock(tcd, i, cpu) {
tcd->tcd_shutting_down = 1;