Merge branch 'x86-microcode-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[firefly-linux-kernel-4.4.55.git] / fs / ocfs2 / journal.c
index 8eccfabcd12ed7a4b229499445585e662a977479..242170d83971a9bef488197111154db6c75cba0b 100644 (file)
@@ -1941,6 +1941,7 @@ void ocfs2_orphan_scan_start(struct ocfs2_super *osb)
 }
 
 struct ocfs2_orphan_filldir_priv {
+       struct dir_context      ctx;
        struct inode            *head;
        struct ocfs2_super      *osb;
 };
@@ -1977,11 +1978,11 @@ static int ocfs2_queue_orphans(struct ocfs2_super *osb,
 {
        int status;
        struct inode *orphan_dir_inode = NULL;
-       struct ocfs2_orphan_filldir_priv priv;
-       loff_t pos = 0;
-
-       priv.osb = osb;
-       priv.head = *head;
+       struct ocfs2_orphan_filldir_priv priv = {
+               .ctx.actor = ocfs2_orphan_filldir,
+               .osb = osb,
+               .head = *head
+       };
 
        orphan_dir_inode = ocfs2_get_system_file_inode(osb,
                                                       ORPHAN_DIR_SYSTEM_INODE,
@@ -1999,8 +2000,7 @@ static int ocfs2_queue_orphans(struct ocfs2_super *osb,
                goto out;
        }
 
-       status = ocfs2_dir_foreach(orphan_dir_inode, &pos, &priv,
-                                  ocfs2_orphan_filldir);
+       status = ocfs2_dir_foreach(orphan_dir_inode, &priv.ctx);
        if (status) {
                mlog_errno(status);
                goto out_cluster;