~ubuntu-branches/ubuntu/vivid/aufs/vivid

« back to all changes in this revision

Viewing changes to fs/aufs25/super.c

  • Committer: Bazaar Package Importer
  • Author(s): Julian Andres Klode
  • Date: 2008-08-21 14:58:54 UTC
  • mfrom: (1.1.8 upstream) (4.1.1 lenny)
  • Revision ID: james.westby@ubuntu.com-20080821145854-4b49x09r4zmvlk5o
Tags: 0+20080719-4
01_vserver_apparmor.dpatch: [UPDATE] Disable vserver patches on kernel 
2.6.26, because they are not needed anymore. (Closes: #495921)

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
/*
20
20
 * mount and super_block operations
21
21
 *
22
 
 * $Id: super.c,v 1.8 2008/06/02 02:40:17 sfjro Exp $
 
22
 * $Id: super.c,v 1.10 2008/07/14 00:14:48 sfjro Exp $
23
23
 */
24
24
 
25
25
#include <linux/module.h>
313
313
#endif
314
314
}
315
315
 
316
 
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) && defined(MmTree)
 
316
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26)
 
317
/* this IS NOT for super_operations */
317
318
static void aufs_umount_begin(struct super_block *arg)
318
319
#define AuUmountBeginSb(arg)    (arg)
319
320
#else
 
321
/* this IS for super_operations */
320
322
static void aufs_umount_begin(struct vfsmount *arg, int flags)
321
323
#define AuUmountBeginSb(arg)    (arg)->mnt_sb
322
324
#endif
355
357
        sbinfo = au_sbi(sb);
356
358
        if (unlikely(!sbinfo))
357
359
                return;
358
 
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) && defined(MmTree)
 
360
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26)
359
361
        aufs_umount_begin(sb);
360
362
#endif
361
363
        kobject_put(&sbinfo->si_kobj);
431
433
                        }
432
434
                }
433
435
 
434
 
        e = au_dpages_init(&dpages, GFP_TEMPORARY);
 
436
        e = au_dpages_init(&dpages, GFP_NOFS);
435
437
        if (unlikely(e)) {
436
438
                if (!err)
437
439
                        err = e;
512
514
        if (!do_dentry)
513
515
                goto out;
514
516
 
515
 
        e = au_dpages_init(&dpages, GFP_TEMPORARY);
 
517
        e = au_dpages_init(&dpages, GFP_NOFS);
516
518
        if (unlikely(e)) {
517
519
                if (!err)
518
520
                        err = e;
594
596
 
595
597
        err = -ENOMEM;
596
598
        memset(&opts, 0, sizeof(opts));
597
 
        opts.opt = (void *)__get_free_page(GFP_TEMPORARY);
 
599
        opts.opt = (void *)__get_free_page(GFP_NOFS);
598
600
        if (unlikely(!opts.opt))
599
601
                goto out;
600
602
        opts.max_opt = PAGE_SIZE / sizeof(*opts.opt);
674
676
 
675
677
        .put_super      = aufs_put_super,
676
678
        .remount_fs     = aufs_remount_fs,
677
 
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) || !defined(MmTree)
 
679
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26)
678
680
        .umount_begin   = aufs_umount_begin
679
681
#endif
680
682
};
737
739
 
738
740
        err = -ENOMEM;
739
741
        memset(&opts, 0, sizeof(opts));
740
 
        opts.opt = (void *)__get_free_page(GFP_TEMPORARY);
 
742
        opts.opt = (void *)__get_free_page(GFP_NOFS);
741
743
        if (unlikely(!opts.opt))
742
744
                goto out;
743
745
        opts.max_opt = PAGE_SIZE / sizeof(*opts.opt);
834
836
 
835
837
struct file_system_type aufs_fs_type = {
836
838
        .name           = AUFS_FSTYPE,
837
 
        .fs_flags       = FS_REVAL_DOT, /* for UDBA and NFS branch */
 
839
        .fs_flags       =
 
840
                FS_RENAME_DOES_D_MOVE   /* a race between rename and others*/
 
841
                | FS_REVAL_DOT,         /* for NFS branch */
838
842
        .get_sb         = aufs_get_sb,
839
843
        .kill_sb        = generic_shutdown_super,
840
844
        /* no need to __module_get() and module_put(). */