trace_ext4_es_shrink_enter(sbi->s_sb, nr_to_scan, ret);
if (!nr_to_scan)
-@@ -1034,23 +1069,149 @@ static int ext4_es_shrink(struct shrinker *shrink, struct shrink_control *sc)
+@@ -1034,23 +1069,150 @@ static int ext4_es_shrink(struct shrinker *shrink, struct shrink_control *sc)
nr_shrunk = __ext4_es_shrink(sbi, nr_to_scan, NULL);
+static void *
+ext4_es_seq_shrinker_info_next(struct seq_file *seq, void *v, loff_t *pos)
+{
++ ++*pos;
+ return NULL;
+}
+
loff_t next = *pos + 1;
rc = kgnilnd_mdd_seq_seek(gseq, next);
+ *pos = next;
if (rc != 0) {
return NULL;
}
- *pos = next;
return gseq;
}
loff_t next = *pos + 1;
rc = kgnilnd_smsg_seq_seek(gseq, next);
+ *pos = next;
if (rc != 0) {
LIBCFS_FREE(gseq, sizeof(*gseq));
return NULL;
}
- *pos = next;
return gseq;
}
loff_t next = *pos + 1;
rc = kgnilnd_conn_seq_seek(gseq, next);
+ *pos = next;
if (rc != 0) {
LIBCFS_FREE(gseq, sizeof(*gseq));
return NULL;
}
- *pos = next;
return gseq;
}
loff_t next = *pos + 1;
rc = kgnilnd_peer_seq_seek(gseq, next);
+ *pos = next;
if (rc != 0) {
LIBCFS_FREE(gseq, sizeof(*gseq));
return NULL;
}
- *pos = next;
return gseq;
}
const struct dt_it_ops *iops;
int rc;
+ ++*pos;
if (param == NULL || param->fsp_stop)
return NULL;
const struct dt_it_ops *iops;
int rc;
+ ++*pos;
if (param == NULL || param->fsp_stop)
return NULL;
static void *pool_proc_next(struct seq_file *s, void *v, loff_t *pos)
{
- struct pool_iterator *iter = (struct pool_iterator *)s->private;
- int prev_idx;
+ struct pool_iterator *iter = (struct pool_iterator *)s->private;
+ int prev_idx;
LASSERTF(iter->magic == POOL_IT_MAGIC, "%08X\n", iter->magic);
- /* test if end of file */
- if (*pos >= pool_tgt_count(iter->pool))
- return NULL;
+ (*pos)++;
+ /* test if end of file */
+ if (*pos > pool_tgt_count(iter->pool))
+ return NULL;
- /* iterate to find a non empty entry */
- prev_idx = iter->idx;
- iter->idx++;
+ /* iterate to find a non empty entry */
+ prev_idx = iter->idx;
+ iter->idx++;
if (iter->idx >= pool_tgt_count(iter->pool)) {
- iter->idx = prev_idx; /* we stay on the last entry */
- return NULL;
- }
- (*pos)++;
- /* return != NULL to continue */
- return iter;
+ iter->idx = prev_idx; /* we stay on the last entry */
+ return NULL;
+ }
+ /* return != NULL to continue */
+ return iter;
}
static void *pool_proc_start(struct seq_file *s, loff_t *pos)
LASSERT(seq->private == p);
LASSERT(!list_empty(&ref->lf_linkage));
+ (*pos)++;
spin_lock(&lu_ref_refs_guard);
next = list_entry(ref->lf_linkage.next, struct lu_ref, lf_linkage);
- if (&next->lf_linkage == &lu_ref_refs) {
+ if (&next->lf_linkage == &lu_ref_refs)
p = NULL;
- } else {
- (*pos)++;
+ else
list_move(&ref->lf_linkage, &next->lf_linkage);
- }
spin_unlock(&lu_ref_refs_guard);
+
return p;
}
}
OBD_FREE(srhi, sizeof(*srhi));
+ ++*pos;
return NULL;
}