~mathiaz/apparmor/ubuntu-mathiaz

« back to all changes in this revision

Viewing changes to kernel-patches/for-mainline/vfs-getxattr.diff

  • Committer: Mathias Gug
  • Date: 2008-02-04 18:57:00 UTC
  • mfrom: (885.1.5 apparmor)
  • Revision ID: mathiaz@ubuntu.com-20080204185700-wwlyq0ksssxclv8w
Merge  ubuntu branch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
--- a/fs/nfsd/nfs4xdr.c
20
20
+++ b/fs/nfsd/nfs4xdr.c
21
 
@@ -1491,7 +1491,7 @@ nfsd4_encode_fattr(struct svc_fh *fhp, s
 
21
@@ -1496,7 +1496,7 @@ nfsd4_encode_fattr(struct svc_fh *fhp, s
22
22
        }
23
23
        if (bmval0 & (FATTR4_WORD0_ACL | FATTR4_WORD0_ACLSUPPORT
24
24
                        | FATTR4_WORD0_SUPPORTED_ATTRS)) {
29
29
                        if (err == -EOPNOTSUPP)
30
30
--- a/fs/nfsd/vfs.c
31
31
+++ b/fs/nfsd/vfs.c
32
 
@@ -395,11 +395,12 @@ out_nfserr:
 
32
@@ -408,11 +408,12 @@ out_nfserr:
33
33
 #if defined(CONFIG_NFSD_V2_ACL) || \
34
34
     defined(CONFIG_NFSD_V3_ACL) || \
35
35
     defined(CONFIG_NFSD_V4)
44
44
        if (buflen <= 0)
45
45
                return buflen;
46
46
 
47
 
@@ -407,7 +408,7 @@ static ssize_t nfsd_getxattr(struct dent
 
47
@@ -420,7 +421,7 @@ static ssize_t nfsd_getxattr(struct dent
48
48
        if (!*buf)
49
49
                return -ENOMEM;
50
50
 
53
53
 }
54
54
 #endif
55
55
 
56
 
@@ -488,13 +489,13 @@ out_nfserr:
 
56
@@ -501,13 +502,13 @@ out_nfserr:
57
57
 }
58
58
 
59
59
 static struct posix_acl *
69
69
        if (!buflen)
70
70
                buflen = -ENODATA;
71
71
        if (buflen <= 0)
72
 
@@ -506,14 +507,15 @@ _get_posix_acl(struct dentry *dentry, ch
 
72
@@ -519,14 +520,15 @@ _get_posix_acl(struct dentry *dentry, ch
73
73
 }
74
74
 
75
75
 int
87
87
        if (IS_ERR(pacl) && PTR_ERR(pacl) == -ENODATA)
88
88
                pacl = posix_acl_from_mode(inode->i_mode, GFP_KERNEL);
89
89
        if (IS_ERR(pacl)) {
90
 
@@ -523,7 +525,7 @@ nfsd4_get_nfs4_acl(struct svc_rqst *rqst
 
90
@@ -536,7 +538,7 @@ nfsd4_get_nfs4_acl(struct svc_rqst *rqst
91
91
        }
92
92
 
93
93
        if (S_ISDIR(inode->i_mode)) {
96
96
                if (IS_ERR(dpacl) && PTR_ERR(dpacl) == -ENODATA)
97
97
                        dpacl = NULL;
98
98
                else if (IS_ERR(dpacl)) {
99
 
@@ -1973,7 +1975,8 @@ nfsd_get_posix_acl(struct svc_fh *fhp, i
 
99
@@ -2001,7 +2003,8 @@ nfsd_get_posix_acl(struct svc_fh *fhp, i
100
100
                return ERR_PTR(-EOPNOTSUPP);
101
101
        }
102
102
 
158
158
@@ -350,7 +352,7 @@ sys_fgetxattr(int fd, char __user *name,
159
159
        if (!f)
160
160
                return error;
161
 
        audit_inode(NULL, f->f_path.dentry->d_inode);
 
161
        audit_inode(NULL, f->f_path.dentry);
162
162
-       error = getxattr(f->f_path.dentry, name, value, size);
163
163
+       error = getxattr(f->f_path.dentry, f->f_path.mnt, name, value, size);
164
164
        fput(f);