~ubuntu-branches/debian/wheezy/linux-2.6/wheezy

« back to all changes in this revision

Viewing changes to fs/posix_acl.c

  • Committer: Bazaar Package Importer
  • Author(s): Ben Hutchings, Ben Hutchings, Aurelien Jarno, Martin Michlmayr
  • Date: 2011-04-06 13:53:30 UTC
  • mfrom: (43.1.5 sid)
  • Revision ID: james.westby@ubuntu.com-20110406135330-wjufxhd0tvn3zx4z
Tags: 2.6.38-3
[ Ben Hutchings ]
* [ppc64] Add to linux-tools package architectures (Closes: #620124)
* [amd64] Save cr4 to mmu_cr4_features at boot time (Closes: #620284)
* appletalk: Fix bugs introduced when removing use of BKL
* ALSA: Fix yet another race in disconnection
* cciss: Fix lost command issue
* ath9k: Fix kernel panic in AR2427
* ses: Avoid kernel panic when lun 0 is not mapped
* PCI/ACPI: Report ASPM support to BIOS if not disabled from command line

[ Aurelien Jarno ]
* rtlwifi: fix build when PCI is not enabled.

[ Martin Michlmayr ]
* rtlwifi: Eliminate udelay calls with too large values (Closes: #620204)

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
 
23
23
#include <linux/errno.h>
24
24
 
 
25
EXPORT_SYMBOL(posix_acl_init);
25
26
EXPORT_SYMBOL(posix_acl_alloc);
26
27
EXPORT_SYMBOL(posix_acl_clone);
27
28
EXPORT_SYMBOL(posix_acl_valid);
32
33
EXPORT_SYMBOL(posix_acl_permission);
33
34
 
34
35
/*
 
36
 * Init a fresh posix_acl
 
37
 */
 
38
void
 
39
posix_acl_init(struct posix_acl *acl, int count)
 
40
{
 
41
        atomic_set(&acl->a_refcount, 1);
 
42
        acl->a_count = count;
 
43
}
 
44
 
 
45
/*
35
46
 * Allocate a new ACL with the specified number of entries.
36
47
 */
37
48
struct posix_acl *
40
51
        const size_t size = sizeof(struct posix_acl) +
41
52
                            count * sizeof(struct posix_acl_entry);
42
53
        struct posix_acl *acl = kmalloc(size, flags);
43
 
        if (acl) {
44
 
                atomic_set(&acl->a_refcount, 1);
45
 
                acl->a_count = count;
46
 
        }
 
54
        if (acl)
 
55
                posix_acl_init(acl, count);
47
56
        return acl;
48
57
}
49
58