aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2005-06-28 23:44:58 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-29 00:20:31 -0400
commit334a13ec3d01a1a4b4f2249735b793105cb4a519 (patch)
tree10d9f23026d8c1c75f172751322acaba7ff63d81
parentaade0e82739f4b24c5b952de68c8d794459ad531 (diff)
[PATCH] really remove xattr_acl.h
Looks like it sneaked back with the NFS ACL merge.. Signed-off-by: Christoph Hellwig <hch@lst.de> Cc: Trond Myklebust <trond.myklebust@fys.uio.no> Cc: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--fs/nfs/nfs3acl.c14
-rw-r--r--fs/nfsd/vfs.c13
-rw-r--r--include/linux/xattr_acl.h50
3 files changed, 13 insertions, 64 deletions
diff --git a/fs/nfs/nfs3acl.c b/fs/nfs/nfs3acl.c
index ee3536fc84a3..1b7a3ef2f813 100644
--- a/fs/nfs/nfs3acl.c
+++ b/fs/nfs/nfs3acl.c
@@ -2,7 +2,7 @@
2#include <linux/nfs.h> 2#include <linux/nfs.h>
3#include <linux/nfs3.h> 3#include <linux/nfs3.h>
4#include <linux/nfs_fs.h> 4#include <linux/nfs_fs.h>
5#include <linux/xattr_acl.h> 5#include <linux/posix_acl_xattr.h>
6#include <linux/nfsacl.h> 6#include <linux/nfsacl.h>
7 7
8#define NFSDBG_FACILITY NFSDBG_PROC 8#define NFSDBG_FACILITY NFSDBG_PROC
@@ -53,9 +53,9 @@ ssize_t nfs3_getxattr(struct dentry *dentry, const char *name,
53 struct posix_acl *acl; 53 struct posix_acl *acl;
54 int type, error = 0; 54 int type, error = 0;
55 55
56 if (strcmp(name, XATTR_NAME_ACL_ACCESS) == 0) 56 if (strcmp(name, POSIX_ACL_XATTR_ACCESS) == 0)
57 type = ACL_TYPE_ACCESS; 57 type = ACL_TYPE_ACCESS;
58 else if (strcmp(name, XATTR_NAME_ACL_DEFAULT) == 0) 58 else if (strcmp(name, POSIX_ACL_XATTR_DEFAULT) == 0)
59 type = ACL_TYPE_DEFAULT; 59 type = ACL_TYPE_DEFAULT;
60 else 60 else
61 return -EOPNOTSUPP; 61 return -EOPNOTSUPP;
@@ -82,9 +82,9 @@ int nfs3_setxattr(struct dentry *dentry, const char *name,
82 struct posix_acl *acl; 82 struct posix_acl *acl;
83 int type, error; 83 int type, error;
84 84
85 if (strcmp(name, XATTR_NAME_ACL_ACCESS) == 0) 85 if (strcmp(name, POSIX_ACL_XATTR_ACCESS) == 0)
86 type = ACL_TYPE_ACCESS; 86 type = ACL_TYPE_ACCESS;
87 else if (strcmp(name, XATTR_NAME_ACL_DEFAULT) == 0) 87 else if (strcmp(name, POSIX_ACL_XATTR_DEFAULT) == 0)
88 type = ACL_TYPE_DEFAULT; 88 type = ACL_TYPE_DEFAULT;
89 else 89 else
90 return -EOPNOTSUPP; 90 return -EOPNOTSUPP;
@@ -103,9 +103,9 @@ int nfs3_removexattr(struct dentry *dentry, const char *name)
103 struct inode *inode = dentry->d_inode; 103 struct inode *inode = dentry->d_inode;
104 int type; 104 int type;
105 105
106 if (strcmp(name, XATTR_NAME_ACL_ACCESS) == 0) 106 if (strcmp(name, POSIX_ACL_XATTR_ACCESS) == 0)
107 type = ACL_TYPE_ACCESS; 107 type = ACL_TYPE_ACCESS;
108 else if (strcmp(name, XATTR_NAME_ACL_DEFAULT) == 0) 108 else if (strcmp(name, POSIX_ACL_XATTR_DEFAULT) == 0)
109 type = ACL_TYPE_DEFAULT; 109 type = ACL_TYPE_DEFAULT;
110 else 110 else
111 return -EOPNOTSUPP; 111 return -EOPNOTSUPP;
diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c
index de340ffd33c3..be24ead89d94 100644
--- a/fs/nfsd/vfs.c
+++ b/fs/nfsd/vfs.c
@@ -46,10 +46,9 @@
46#include <linux/nfsd/nfsfh.h> 46#include <linux/nfsd/nfsfh.h>
47#include <linux/quotaops.h> 47#include <linux/quotaops.h>
48#include <linux/dnotify.h> 48#include <linux/dnotify.h>
49#include <linux/xattr_acl.h>
50#include <linux/posix_acl.h> 49#include <linux/posix_acl.h>
51#ifdef CONFIG_NFSD_V4
52#include <linux/posix_acl_xattr.h> 50#include <linux/posix_acl_xattr.h>
51#ifdef CONFIG_NFSD_V4
53#include <linux/xattr.h> 52#include <linux/xattr.h>
54#include <linux/nfs4.h> 53#include <linux/nfs4.h>
55#include <linux/nfs4_acl.h> 54#include <linux/nfs4_acl.h>
@@ -1872,10 +1871,10 @@ nfsd_get_posix_acl(struct svc_fh *fhp, int type)
1872 return ERR_PTR(-EOPNOTSUPP); 1871 return ERR_PTR(-EOPNOTSUPP);
1873 switch(type) { 1872 switch(type) {
1874 case ACL_TYPE_ACCESS: 1873 case ACL_TYPE_ACCESS:
1875 name = XATTR_NAME_ACL_ACCESS; 1874 name = POSIX_ACL_XATTR_ACCESS;
1876 break; 1875 break;
1877 case ACL_TYPE_DEFAULT: 1876 case ACL_TYPE_DEFAULT:
1878 name = XATTR_NAME_ACL_DEFAULT; 1877 name = POSIX_ACL_XATTR_DEFAULT;
1879 break; 1878 break;
1880 default: 1879 default:
1881 return ERR_PTR(-EOPNOTSUPP); 1880 return ERR_PTR(-EOPNOTSUPP);
@@ -1919,17 +1918,17 @@ nfsd_set_posix_acl(struct svc_fh *fhp, int type, struct posix_acl *acl)
1919 return -EOPNOTSUPP; 1918 return -EOPNOTSUPP;
1920 switch(type) { 1919 switch(type) {
1921 case ACL_TYPE_ACCESS: 1920 case ACL_TYPE_ACCESS:
1922 name = XATTR_NAME_ACL_ACCESS; 1921 name = POSIX_ACL_XATTR_ACCESS;
1923 break; 1922 break;
1924 case ACL_TYPE_DEFAULT: 1923 case ACL_TYPE_DEFAULT:
1925 name = XATTR_NAME_ACL_DEFAULT; 1924 name = POSIX_ACL_XATTR_DEFAULT;
1926 break; 1925 break;
1927 default: 1926 default:
1928 return -EOPNOTSUPP; 1927 return -EOPNOTSUPP;
1929 } 1928 }
1930 1929
1931 if (acl && acl->a_count) { 1930 if (acl && acl->a_count) {
1932 size = xattr_acl_size(acl->a_count); 1931 size = posix_acl_xattr_size(acl->a_count);
1933 value = kmalloc(size, GFP_KERNEL); 1932 value = kmalloc(size, GFP_KERNEL);
1934 if (!value) 1933 if (!value)
1935 return -ENOMEM; 1934 return -ENOMEM;
diff --git a/include/linux/xattr_acl.h b/include/linux/xattr_acl.h
deleted file mode 100644
index 7a1f9b93a45f..000000000000
--- a/include/linux/xattr_acl.h
+++ /dev/null
@@ -1,50 +0,0 @@
1/*
2 File: linux/xattr_acl.h
3
4 (extended attribute representation of access control lists)
5
6 (C) 2000 Andreas Gruenbacher, <a.gruenbacher@computer.org>
7*/
8
9#ifndef _LINUX_XATTR_ACL_H
10#define _LINUX_XATTR_ACL_H
11
12#include <linux/posix_acl.h>
13
14#define XATTR_NAME_ACL_ACCESS "system.posix_acl_access"
15#define XATTR_NAME_ACL_DEFAULT "system.posix_acl_default"
16
17#define XATTR_ACL_VERSION 0x0002
18
19typedef struct {
20 __u16 e_tag;
21 __u16 e_perm;
22 __u32 e_id;
23} xattr_acl_entry;
24
25typedef struct {
26 __u32 a_version;
27 xattr_acl_entry a_entries[0];
28} xattr_acl_header;
29
30static inline size_t xattr_acl_size(int count)
31{
32 return sizeof(xattr_acl_header) + count * sizeof(xattr_acl_entry);
33}
34
35static inline int xattr_acl_count(size_t size)
36{
37 if (size < sizeof(xattr_acl_header))
38 return -1;
39 size -= sizeof(xattr_acl_header);
40 if (size % sizeof(xattr_acl_entry))
41 return -1;
42 return size / sizeof(xattr_acl_entry);
43}
44
45struct posix_acl * posix_acl_from_xattr(const void *value, size_t size);
46int posix_acl_to_xattr(const struct posix_acl *acl, void *buffer, size_t size);
47
48
49
50#endif /* _LINUX_XATTR_ACL_H */