[PATCH] remove <linux/xattr_acl.h>
authorChristoph Hellwig <hch@lst.de>
Thu, 23 Jun 2005 07:10:19 +0000 (00:10 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Thu, 23 Jun 2005 16:45:33 +0000 (09:45 -0700)
This file duplicates <linux/posix_acl_xattr.h>, using slightly different
names.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
14 files changed:
arch/ppc/boot/simple/misc.c
arch/ppc/boot/simple/mpc10x_memory.c
fs/ext2/acl.c
fs/ext2/acl.h
fs/ext3/acl.c
fs/ext3/acl.h
fs/jfs/acl.c
fs/jfs/jfs_acl.h
fs/jfs/super.c
fs/jfs/xattr.c
fs/nfsd/vfs.c
fs/reiserfs/xattr_acl.c
include/linux/posix_acl_xattr.h
include/linux/reiserfs_acl.h

index ab0f9902cb67c62b0aad6b9502c5675de7042bdb..e02de5b467a45ff9e278f59350bdbdd1c020d5b0 100644 (file)
@@ -222,7 +222,7 @@ decompress_kernel(unsigned long load_addr, int num_words, unsigned long cksum)
        puts("\n");
 
        puts("Uncompressing Linux...");
-       gunzip(0x0, 0x400000, zimage_start, &zimage_size);
+       gunzip(NULL, 0x400000, zimage_start, &zimage_size);
        puts("done.\n");
 
        /* get the bi_rec address */
index 977daedc14c06e486242751cb293cfb62306e980..20d92a34ceb854e172b3cee797edbb7b1741ed8f 100644 (file)
@@ -33,7 +33,7 @@
 
 #define MPC10X_PCI_OP(rw, size, type, op, mask)                                \
 static void                                                            \
-mpc10x_##rw##_config_##size(unsigned int *cfg_addr,                    \
+mpc10x_##rw##_config_##size(unsigned int __iomem *cfg_addr,                    \
                unsigned int *cfg_data, int devfn, int offset,          \
                type val)                                               \
 {                                                                      \
index 25f4a64fd6bc005f2204973300461dfa185bc020..213148c36ebef341ae8c460af7cd2d9c095a5d3b 100644 (file)
@@ -396,12 +396,12 @@ static size_t
 ext2_xattr_list_acl_access(struct inode *inode, char *list, size_t list_size,
                           const char *name, size_t name_len)
 {
-       const size_t size = sizeof(XATTR_NAME_ACL_ACCESS);
+       const size_t size = sizeof(POSIX_ACL_XATTR_ACCESS);
 
        if (!test_opt(inode->i_sb, POSIX_ACL))
                return 0;
        if (list && size <= list_size)
-               memcpy(list, XATTR_NAME_ACL_ACCESS, size);
+               memcpy(list, POSIX_ACL_XATTR_ACCESS, size);
        return size;
 }
 
@@ -409,12 +409,12 @@ static size_t
 ext2_xattr_list_acl_default(struct inode *inode, char *list, size_t list_size,
                            const char *name, size_t name_len)
 {
-       const size_t size = sizeof(XATTR_NAME_ACL_DEFAULT);
+       const size_t size = sizeof(POSIX_ACL_XATTR_DEFAULT);
 
        if (!test_opt(inode->i_sb, POSIX_ACL))
                return 0;
        if (list && size <= list_size)
-               memcpy(list, XATTR_NAME_ACL_DEFAULT, size);
+               memcpy(list, POSIX_ACL_XATTR_DEFAULT, size);
        return size;
 }
 
@@ -506,14 +506,14 @@ ext2_xattr_set_acl_default(struct inode *inode, const char *name,
 }
 
 struct xattr_handler ext2_xattr_acl_access_handler = {
-       .prefix = XATTR_NAME_ACL_ACCESS,
+       .prefix = POSIX_ACL_XATTR_ACCESS,
        .list   = ext2_xattr_list_acl_access,
        .get    = ext2_xattr_get_acl_access,
        .set    = ext2_xattr_set_acl_access,
 };
 
 struct xattr_handler ext2_xattr_acl_default_handler = {
-       .prefix = XATTR_NAME_ACL_DEFAULT,
+       .prefix = POSIX_ACL_XATTR_DEFAULT,
        .list   = ext2_xattr_list_acl_default,
        .get    = ext2_xattr_get_acl_default,
        .set    = ext2_xattr_set_acl_default,
index fed96ae81a7d1c380a999a6c83e26ae44b621a6a..0bde85bafe386eb47187919a8409e0231b4f5298 100644 (file)
@@ -4,7 +4,7 @@
   (C) 2001 Andreas Gruenbacher, <a.gruenbacher@computer.org>
 */
 
-#include <linux/xattr_acl.h>
+#include <linux/posix_acl_xattr.h>
 
 #define EXT2_ACL_VERSION       0x0001
 
index 638c13a26c0375dc5536fe44e51963c1cf217040..133f5aa581bb6f7d17bdb0ef2285b5b8a8da762c 100644 (file)
@@ -417,12 +417,12 @@ static size_t
 ext3_xattr_list_acl_access(struct inode *inode, char *list, size_t list_len,
                           const char *name, size_t name_len)
 {
-       const size_t size = sizeof(XATTR_NAME_ACL_ACCESS);
+       const size_t size = sizeof(POSIX_ACL_XATTR_ACCESS);
 
        if (!test_opt(inode->i_sb, POSIX_ACL))
                return 0;
        if (list && size <= list_len)
-               memcpy(list, XATTR_NAME_ACL_ACCESS, size);
+               memcpy(list, POSIX_ACL_XATTR_ACCESS, size);
        return size;
 }
 
@@ -430,12 +430,12 @@ static size_t
 ext3_xattr_list_acl_default(struct inode *inode, char *list, size_t list_len,
                            const char *name, size_t name_len)
 {
-       const size_t size = sizeof(XATTR_NAME_ACL_DEFAULT);
+       const size_t size = sizeof(POSIX_ACL_XATTR_DEFAULT);
 
        if (!test_opt(inode->i_sb, POSIX_ACL))
                return 0;
        if (list && size <= list_len)
-               memcpy(list, XATTR_NAME_ACL_DEFAULT, size);
+               memcpy(list, POSIX_ACL_XATTR_DEFAULT, size);
        return size;
 }
 
@@ -535,14 +535,14 @@ ext3_xattr_set_acl_default(struct inode *inode, const char *name,
 }
 
 struct xattr_handler ext3_xattr_acl_access_handler = {
-       .prefix = XATTR_NAME_ACL_ACCESS,
+       .prefix = POSIX_ACL_XATTR_ACCESS,
        .list   = ext3_xattr_list_acl_access,
        .get    = ext3_xattr_get_acl_access,
        .set    = ext3_xattr_set_acl_access,
 };
 
 struct xattr_handler ext3_xattr_acl_default_handler = {
-       .prefix = XATTR_NAME_ACL_DEFAULT,
+       .prefix = POSIX_ACL_XATTR_DEFAULT,
        .list   = ext3_xattr_list_acl_default,
        .get    = ext3_xattr_get_acl_default,
        .set    = ext3_xattr_set_acl_default,
index 98af0c0d0ba9570b23c4dc6602ee9eb5d922d011..92d50b53a9338f8b5759b80702ccb9e97ddcfe2c 100644 (file)
@@ -4,7 +4,7 @@
   (C) 2001 Andreas Gruenbacher, <a.gruenbacher@computer.org>
 */
 
-#include <linux/xattr_acl.h>
+#include <linux/posix_acl_xattr.h>
 
 #define EXT3_ACL_VERSION       0x0001
 
index 30a2bf9eeda515e3e6c50692071aa8f45b66468a..e892dab40c26ab4d0cd6f97804ae28dcdf5ccc77 100644 (file)
@@ -21,6 +21,7 @@
 #include <linux/sched.h>
 #include <linux/fs.h>
 #include <linux/quotaops.h>
+#include <linux/posix_acl_xattr.h>
 #include "jfs_incore.h"
 #include "jfs_xattr.h"
 #include "jfs_acl.h"
@@ -36,11 +37,11 @@ static struct posix_acl *jfs_get_acl(struct inode *inode, int type)
 
        switch(type) {
                case ACL_TYPE_ACCESS:
-                       ea_name = XATTR_NAME_ACL_ACCESS;
+                       ea_name = POSIX_ACL_XATTR_ACCESS;
                        p_acl = &ji->i_acl;
                        break;
                case ACL_TYPE_DEFAULT:
-                       ea_name = XATTR_NAME_ACL_DEFAULT;
+                       ea_name = POSIX_ACL_XATTR_DEFAULT;
                        p_acl = &ji->i_default_acl;
                        break;
                default:
@@ -88,11 +89,11 @@ static int jfs_set_acl(struct inode *inode, int type, struct posix_acl *acl)
 
        switch(type) {
                case ACL_TYPE_ACCESS:
-                       ea_name = XATTR_NAME_ACL_ACCESS;
+                       ea_name = POSIX_ACL_XATTR_ACCESS;
                        p_acl = &ji->i_acl;
                        break;
                case ACL_TYPE_DEFAULT:
-                       ea_name = XATTR_NAME_ACL_DEFAULT;
+                       ea_name = POSIX_ACL_XATTR_DEFAULT;
                        p_acl = &ji->i_default_acl;
                        if (!S_ISDIR(inode->i_mode))
                                return acl ? -EACCES : 0;
@@ -101,7 +102,7 @@ static int jfs_set_acl(struct inode *inode, int type, struct posix_acl *acl)
                        return -EINVAL;
        }
        if (acl) {
-               size = xattr_acl_size(acl->a_count);
+               size = posix_acl_xattr_size(acl->a_count);
                value = kmalloc(size, GFP_KERNEL);
                if (!value)
                        return -ENOMEM;
index d2ae430adecf4a4b7712a1211f78a70a5961c145..a3acd3eec059c752acce63f35adb86fe15559aec 100644 (file)
@@ -20,8 +20,6 @@
 
 #ifdef CONFIG_JFS_POSIX_ACL
 
-#include <linux/xattr_acl.h>
-
 int jfs_permission(struct inode *, int, struct nameidata *);
 int jfs_init_acl(struct inode *, struct inode *);
 int jfs_setattr(struct dentry *, struct iattr *);
index 810a3653d8b3a4f26ffb66d4c4a883733445c5eb..ee32211288cefadc7b86c7d33129f6d279950ee3 100644 (file)
@@ -24,6 +24,7 @@
 #include <linux/completion.h>
 #include <linux/vfs.h>
 #include <linux/moduleparam.h>
+#include <linux/posix_acl.h>
 #include <asm/uaccess.h>
 
 #include "jfs_incore.h"
index 6016373701a3662e649217aa0b0b23d02a2f993c..ee438d429d457700457c0c30eb0dde9e8c695497 100644 (file)
@@ -19,6 +19,7 @@
 
 #include <linux/fs.h>
 #include <linux/xattr.h>
+#include <linux/posix_acl_xattr.h>
 #include <linux/quotaops.h>
 #include "jfs_incore.h"
 #include "jfs_superblock.h"
@@ -718,9 +719,9 @@ static int can_set_system_xattr(struct inode *inode, const char *name,
                return -EPERM;
 
        /*
-        * XATTR_NAME_ACL_ACCESS is tied to i_mode
+        * POSIX_ACL_XATTR_ACCESS is tied to i_mode
         */
-       if (strcmp(name, XATTR_NAME_ACL_ACCESS) == 0) {
+       if (strcmp(name, POSIX_ACL_XATTR_ACCESS) == 0) {
                acl = posix_acl_from_xattr(value, value_len);
                if (IS_ERR(acl)) {
                        rc = PTR_ERR(acl);
@@ -750,7 +751,7 @@ static int can_set_system_xattr(struct inode *inode, const char *name,
                JFS_IP(inode)->i_acl = JFS_ACL_NOT_CACHED;
 
                return 0;
-       } else if (strcmp(name, XATTR_NAME_ACL_DEFAULT) == 0) {
+       } else if (strcmp(name, POSIX_ACL_XATTR_DEFAULT) == 0) {
                acl = posix_acl_from_xattr(value, value_len);
                if (IS_ERR(acl)) {
                        rc = PTR_ERR(acl);
index ae3940dc85cc091fc260d8c042ba7295e1c0b4ef..de340ffd33c3e1dcbc4c4156536021cb5274e169 100644 (file)
@@ -50,7 +50,6 @@
 #include <linux/posix_acl.h>
 #ifdef CONFIG_NFSD_V4
 #include <linux/posix_acl_xattr.h>
-#include <linux/xattr_acl.h>
 #include <linux/xattr.h>
 #include <linux/nfs4.h>
 #include <linux/nfs4_acl.h>
@@ -425,13 +424,13 @@ nfsd4_set_nfs4_acl(struct svc_rqst *rqstp, struct svc_fh *fhp,
                goto out_nfserr;
 
        if (pacl) {
-               error = set_nfsv4_acl_one(dentry, pacl, XATTR_NAME_ACL_ACCESS);
+               error = set_nfsv4_acl_one(dentry, pacl, POSIX_ACL_XATTR_ACCESS);
                if (error < 0)
                        goto out_nfserr;
        }
 
        if (dpacl) {
-               error = set_nfsv4_acl_one(dentry, dpacl, XATTR_NAME_ACL_DEFAULT);
+               error = set_nfsv4_acl_one(dentry, dpacl, POSIX_ACL_XATTR_DEFAULT);
                if (error < 0)
                        goto out_nfserr;
        }
@@ -498,7 +497,7 @@ nfsd4_get_nfs4_acl(struct svc_rqst *rqstp, struct dentry *dentry, struct nfs4_ac
        struct posix_acl *pacl = NULL, *dpacl = NULL;
        unsigned int flags = 0;
 
-       pacl = _get_posix_acl(dentry, XATTR_NAME_ACL_ACCESS);
+       pacl = _get_posix_acl(dentry, POSIX_ACL_XATTR_ACCESS);
        if (IS_ERR(pacl) && PTR_ERR(pacl) == -ENODATA)
                pacl = posix_acl_from_mode(inode->i_mode, GFP_KERNEL);
        if (IS_ERR(pacl)) {
@@ -508,7 +507,7 @@ nfsd4_get_nfs4_acl(struct svc_rqst *rqstp, struct dentry *dentry, struct nfs4_ac
        }
 
        if (S_ISDIR(inode->i_mode)) {
-               dpacl = _get_posix_acl(dentry, XATTR_NAME_ACL_DEFAULT);
+               dpacl = _get_posix_acl(dentry, POSIX_ACL_XATTR_DEFAULT);
                if (IS_ERR(dpacl) && PTR_ERR(dpacl) == -ENODATA)
                        dpacl = NULL;
                else if (IS_ERR(dpacl)) {
index e302071903a1dc23ebe6ff9d6cad89b849877a55..c312881c5f532658c01bbd787b9e6081ce3b7666 100644 (file)
@@ -4,7 +4,7 @@
 #include <linux/errno.h>
 #include <linux/pagemap.h>
 #include <linux/xattr.h>
-#include <linux/xattr_acl.h>
+#include <linux/posix_acl_xattr.h>
 #include <linux/reiserfs_xattr.h>
 #include <linux/reiserfs_acl.h>
 #include <asm/uaccess.h>
@@ -192,11 +192,11 @@ reiserfs_get_acl(struct inode *inode, int type)
 
         switch (type) {
             case ACL_TYPE_ACCESS:
-                name = XATTR_NAME_ACL_ACCESS;
+                name = POSIX_ACL_XATTR_ACCESS;
                 p_acl = &reiserfs_i->i_acl_access;
                 break;
             case ACL_TYPE_DEFAULT:
-                name = XATTR_NAME_ACL_DEFAULT;
+                name = POSIX_ACL_XATTR_DEFAULT;
                 p_acl = &reiserfs_i->i_acl_default;
                 break;
             default:
@@ -260,7 +260,7 @@ reiserfs_set_acl(struct inode *inode, int type, struct posix_acl *acl)
 
         switch (type) {
             case ACL_TYPE_ACCESS:
-                name = XATTR_NAME_ACL_ACCESS;
+                name = POSIX_ACL_XATTR_ACCESS;
                 p_acl = &reiserfs_i->i_acl_access;
                 if (acl) {
                     mode_t mode = inode->i_mode;
@@ -275,7 +275,7 @@ reiserfs_set_acl(struct inode *inode, int type, struct posix_acl *acl)
                 }
                 break;
             case ACL_TYPE_DEFAULT:
-                name = XATTR_NAME_ACL_DEFAULT;
+                name = POSIX_ACL_XATTR_DEFAULT;
                 p_acl = &reiserfs_i->i_acl_default;
                 if (!S_ISDIR (inode->i_mode))
                     return acl ? -EACCES : 0;
@@ -468,7 +468,7 @@ static int
 posix_acl_access_get(struct inode *inode, const char *name,
                          void *buffer, size_t size)
 {
-       if (strlen(name) != sizeof(XATTR_NAME_ACL_ACCESS)-1)
+       if (strlen(name) != sizeof(POSIX_ACL_XATTR_ACCESS)-1)
                return -EINVAL;
        return xattr_get_acl(inode, ACL_TYPE_ACCESS, buffer, size);
 }
@@ -477,7 +477,7 @@ static int
 posix_acl_access_set(struct inode *inode, const char *name,
                          const void *value, size_t size, int flags)
 {
-       if (strlen(name) != sizeof(XATTR_NAME_ACL_ACCESS)-1)
+       if (strlen(name) != sizeof(POSIX_ACL_XATTR_ACCESS)-1)
                return -EINVAL;
        return xattr_set_acl(inode, ACL_TYPE_ACCESS, value, size);
 }
@@ -487,7 +487,7 @@ posix_acl_access_del (struct inode *inode, const char *name)
 {
     struct reiserfs_inode_info *reiserfs_i = REISERFS_I(inode);
     struct posix_acl **acl = &reiserfs_i->i_acl_access;
-    if (strlen(name) != sizeof(XATTR_NAME_ACL_ACCESS)-1)
+    if (strlen(name) != sizeof(POSIX_ACL_XATTR_ACCESS)-1)
        return -EINVAL;
     if (!IS_ERR (*acl) && *acl) {
         posix_acl_release (*acl);
@@ -510,7 +510,7 @@ posix_acl_access_list (struct inode *inode, const char *name, int namelen, char
 }
 
 struct reiserfs_xattr_handler posix_acl_access_handler = {
-       .prefix = XATTR_NAME_ACL_ACCESS,
+       .prefix = POSIX_ACL_XATTR_ACCESS,
        .get = posix_acl_access_get,
        .set = posix_acl_access_set,
        .del = posix_acl_access_del,
@@ -521,7 +521,7 @@ static int
 posix_acl_default_get (struct inode *inode, const char *name,
                           void *buffer, size_t size)
 {
-       if (strlen(name) != sizeof(XATTR_NAME_ACL_DEFAULT)-1)
+       if (strlen(name) != sizeof(POSIX_ACL_XATTR_DEFAULT)-1)
                return -EINVAL;
        return xattr_get_acl(inode, ACL_TYPE_DEFAULT, buffer, size);
 }
@@ -530,7 +530,7 @@ static int
 posix_acl_default_set(struct inode *inode, const char *name,
                           const void *value, size_t size, int flags)
 {
-       if (strlen(name) != sizeof(XATTR_NAME_ACL_DEFAULT)-1)
+       if (strlen(name) != sizeof(POSIX_ACL_XATTR_DEFAULT)-1)
                return -EINVAL;
        return xattr_set_acl(inode, ACL_TYPE_DEFAULT, value, size);
 }
@@ -540,7 +540,7 @@ posix_acl_default_del (struct inode *inode, const char *name)
 {
     struct reiserfs_inode_info *reiserfs_i = REISERFS_I(inode);
     struct posix_acl **acl = &reiserfs_i->i_acl_default;
-    if (strlen(name) != sizeof(XATTR_NAME_ACL_DEFAULT)-1)
+    if (strlen(name) != sizeof(POSIX_ACL_XATTR_DEFAULT)-1)
        return -EINVAL;
     if (!IS_ERR (*acl) && *acl) {
         posix_acl_release (*acl);
@@ -563,7 +563,7 @@ posix_acl_default_list (struct inode *inode, const char *name, int namelen, char
 }
 
 struct reiserfs_xattr_handler posix_acl_default_handler = {
-       .prefix = XATTR_NAME_ACL_DEFAULT,
+       .prefix = POSIX_ACL_XATTR_DEFAULT,
        .get = posix_acl_default_get,
        .set = posix_acl_default_set,
        .del = posix_acl_default_del,
index fe271c1947b205a0d070ef4d39b2b27da75e11d3..6e53c34035cd5b77c7c3e86878a00a3b1861070e 100644 (file)
@@ -52,4 +52,7 @@ posix_acl_xattr_count(size_t size)
        return size / sizeof(posix_acl_xattr_entry);
 }
 
+struct posix_acl *posix_acl_from_xattr(const void *value, size_t size);
+int posix_acl_to_xattr(const struct posix_acl *acl, void *buffer, size_t size);
+
 #endif /* _POSIX_ACL_XATTR_H */
index 2aef9c3f5ce8161fd77a47a9c297b1f127bfbb21..0760507a545bb5fdb93d2806bca81d8bdaa725c8 100644 (file)
@@ -1,6 +1,5 @@
 #include <linux/init.h>
 #include <linux/posix_acl.h>
-#include <linux/xattr_acl.h>
 
 #define REISERFS_ACL_VERSION   0x0001