Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 298988 | Differences between
and this patch

Collapse All | Expand All

(-)vboxvfs.old/utils.c (+15 lines)
Lines 49-54 static struct backing_dev_info sf_backin Link Here
49
                       | BDI_CAP_EXEC_MAP,     /* can be mapped for execution */
49
                       | BDI_CAP_EXEC_MAP,     /* can be mapped for execution */
50
# endif
50
# endif
51
};
51
};
52
53
int sf_bdi_init (const struct vbsf_mount_info_new *info)
54
{
55
        int err;
56
57
        err = bdi_init (&sf_backing_dev_info);
58
        if (!err)
59
                err = bdi_register (&sf_backing_dev_info, NULL, "vboxvfs-%s", info->name);
60
        return err;
61
}
62
63
void sf_bdi_destroy (void)
64
{
65
        bdi_destroy (&sf_backing_dev_info);
66
}
52
#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION (2, 6, 0) */
67
#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION (2, 6, 0) */
53
68
54
#if LINUX_VERSION_CODE < KERNEL_VERSION (2, 6, 0)
69
#if LINUX_VERSION_CODE < KERNEL_VERSION (2, 6, 0)
(-)vboxvfs.old/vfsmod.c (-1 / +14 lines)
Lines 286-291 sf_read_super_aux (struct super_block *s Link Here
286
                goto fail3;
286
                goto fail3;
287
        }
287
        }
288
288
289
#if LINUX_VERSION_CODE >= KERNEL_VERSION (2, 6, 0)
290
        if (sf_bdi_init (info)) {
291
                err = -ENOMEM;  /* XXX */
292
                LogFunc(("could not init bdi\n"));
293
                goto fail4;
294
        }
295
#endif
296
289
        sf_init_inode (sf_g, iroot, &fsinfo);
297
        sf_init_inode (sf_g, iroot, &fsinfo);
290
        SET_INODE_INFO (iroot, sf_i);
298
        SET_INODE_INFO (iroot, sf_i);
291
299
Lines 297-309 sf_read_super_aux (struct super_block *s Link Here
297
        if (!droot) {
305
        if (!droot) {
298
                err = -ENOMEM;  /* XXX */
306
                err = -ENOMEM;  /* XXX */
299
                LogFunc(("d_alloc_root failed\n"));
307
                LogFunc(("d_alloc_root failed\n"));
300
                goto fail4;
308
                goto fail5;
301
        }
309
        }
302
310
303
        sb->s_root = droot;
311
        sb->s_root = droot;
304
        SET_GLOB_INFO (sb, sf_g);
312
        SET_GLOB_INFO (sb, sf_g);
305
        return 0;
313
        return 0;
306
314
315
 fail5:
316
        sf_bdi_destroy ();
307
 fail4:
317
 fail4:
308
        iput (iroot);
318
        iput (iroot);
309
 fail3:
319
 fail3:
Lines 369-374 sf_put_super (struct super_block *sb) Link Here
369
{
379
{
370
        struct sf_glob_info *sf_g;
380
        struct sf_glob_info *sf_g;
371
381
382
#if LINUX_VERSION_CODE >= KERNEL_VERSION (2, 6, 0)
383
        sf_bdi_destroy ();
384
#endif
372
        sf_g = GET_GLOB_INFO (sb);
385
        sf_g = GET_GLOB_INFO (sb);
373
        BUG_ON (!sf_g);
386
        BUG_ON (!sf_g);
374
        sf_glob_free (sf_g);
387
        sf_glob_free (sf_g);
(-)vboxvfs.old/vfsmod.h (+7 lines)
Lines 81-86 extern struct address_space_operations s Link Here
81
extern void
81
extern void
82
sf_init_inode (struct sf_glob_info *sf_g, struct inode *inode,
82
sf_init_inode (struct sf_glob_info *sf_g, struct inode *inode,
83
               RTFSOBJINFO *info);
83
               RTFSOBJINFO *info);
84
85
extern int
86
sf_bdi_init (const struct vbsf_mount_info_new *info);
87
88
extern void
89
sf_bdi_destroy (void);
90
84
extern int
91
extern int
85
sf_stat (const char *caller, struct sf_glob_info *sf_g,
92
sf_stat (const char *caller, struct sf_glob_info *sf_g,
86
         SHFLSTRING *path, RTFSOBJINFO *result, int ok_to_fail);
93
         SHFLSTRING *path, RTFSOBJINFO *result, int ok_to_fail);

Return to bug 298988