]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blobdiff - fs/seq_file.c
NFSv4.1: We must always send RECLAIM_COMPLETE after a reboot
[mirror_ubuntu-jammy-kernel.git] / fs / seq_file.c
index 4a2cda04d3e293b523549f72f535a0ddb9f5c631..b17ee4c4f618a4abb73d27672010c9fab5285bb9 100644 (file)
@@ -947,6 +947,38 @@ struct list_head *seq_list_next(void *v, struct list_head *head, loff_t *ppos)
 }
 EXPORT_SYMBOL(seq_list_next);
 
+struct list_head *seq_list_start_rcu(struct list_head *head, loff_t pos)
+{
+       struct list_head *lh;
+
+       list_for_each_rcu(lh, head)
+               if (pos-- == 0)
+                       return lh;
+
+       return NULL;
+}
+EXPORT_SYMBOL(seq_list_start_rcu);
+
+struct list_head *seq_list_start_head_rcu(struct list_head *head, loff_t pos)
+{
+       if (!pos)
+               return head;
+
+       return seq_list_start_rcu(head, pos - 1);
+}
+EXPORT_SYMBOL(seq_list_start_head_rcu);
+
+struct list_head *seq_list_next_rcu(void *v, struct list_head *head,
+                                   loff_t *ppos)
+{
+       struct list_head *lh;
+
+       lh = list_next_rcu((struct list_head *)v);
+       ++*ppos;
+       return lh == head ? NULL : lh;
+}
+EXPORT_SYMBOL(seq_list_next_rcu);
+
 /**
  * seq_hlist_start - start an iteration of a hlist
  * @head: the head of the hlist