~ubuntu-branches/ubuntu/wily/apparmor/wily

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Kees Cook
  • Date: 2011-04-27 10:38:07 UTC
  • mfrom: (5.1.118 natty)
  • Revision ID: james.westby@ubuntu.com-20110427103807-ym3rhwys6o84ith0
Tags: 2.6.1-2
debian/copyright: clarify for some full organization names.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
Add a struct vfsmount parameter to vfs_removexattr()
2
 
 
3
 
Signed-off-by: Tony Jones <tonyj@suse.de>
4
 
Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
5
 
 
6
 
Index: b/fs/nfsd/vfs.c
7
 
===================================================================
8
 
--- a/fs/nfsd/vfs.c
9
 
+++ b/fs/nfsd/vfs.c
10
 
@@ -1989,7 +1989,8 @@ nfsd_set_posix_acl(struct svc_fh *fhp, i
11
 
                if (!S_ISDIR(inode->i_mode) && type == ACL_TYPE_DEFAULT)
12
 
                        error = 0;
13
 
                else {
14
 
-                       error = vfs_removexattr(fhp->fh_dentry, name);
15
 
+                       error = vfs_removexattr(fhp->fh_dentry,
16
 
+                                               fhp->fh_export->ex_mnt, name);
17
 
                        if (error == -ENODATA)
18
 
                                error = 0;
19
 
                }
20
 
Index: b/fs/xattr.c
21
 
===================================================================
22
 
--- a/fs/xattr.c
23
 
+++ b/fs/xattr.c
24
 
@@ -166,7 +166,7 @@ vfs_listxattr(struct dentry *dentry, str
25
 
 EXPORT_SYMBOL_GPL(vfs_listxattr);
26
 
 
27
 
 int
28
 
-vfs_removexattr(struct dentry *dentry, char *name)
29
 
+vfs_removexattr(struct dentry *dentry, struct vfsmount *mnt, char *name)
30
 
 {
31
 
        struct inode *inode = dentry->d_inode;
32
 
        int error;
33
 
@@ -437,7 +437,7 @@ sys_flistxattr(int fd, char __user *list
34
 
  * Extended attribute REMOVE operations
35
 
  */
36
 
 static long
37
 
-removexattr(struct dentry *d, char __user *name)
38
 
+removexattr(struct dentry *dentry, struct vfsmount *mnt, char __user *name)
39
 
 {
40
 
        int error;
41
 
        char kname[XATTR_NAME_MAX + 1];
42
 
@@ -448,7 +448,7 @@ removexattr(struct dentry *d, char __use
43
 
        if (error < 0)
44
 
                return error;
45
 
 
46
 
-       return vfs_removexattr(d, kname);
47
 
+       return vfs_removexattr(dentry, mnt, kname);
48
 
 }
49
 
 
50
 
 asmlinkage long
51
 
@@ -460,7 +460,7 @@ sys_removexattr(char __user *path, char 
52
 
        error = user_path_walk(path, &nd);
53
 
        if (error)
54
 
                return error;
55
 
-       error = removexattr(nd.dentry, name);
56
 
+       error = removexattr(nd.dentry, nd.mnt, name);
57
 
        path_release(&nd);
58
 
        return error;
59
 
 }
60
 
@@ -474,7 +474,7 @@ sys_lremovexattr(char __user *path, char
61
 
        error = user_path_walk_link(path, &nd);
62
 
        if (error)
63
 
                return error;
64
 
-       error = removexattr(nd.dentry, name);
65
 
+       error = removexattr(nd.dentry, nd.mnt, name);
66
 
        path_release(&nd);
67
 
        return error;
68
 
 }
69
 
@@ -491,7 +491,7 @@ sys_fremovexattr(int fd, char __user *na
70
 
                return error;
71
 
        dentry = f->f_path.dentry;
72
 
        audit_inode(NULL, dentry->d_inode);
73
 
-       error = removexattr(dentry, name);
74
 
+       error = removexattr(dentry, f->f_path.mnt, name);
75
 
        fput(f);
76
 
        return error;
77
 
 }
78
 
Index: b/include/linux/xattr.h
79
 
===================================================================
80
 
--- a/include/linux/xattr.h
81
 
+++ b/include/linux/xattr.h
82
 
@@ -52,7 +52,7 @@ ssize_t vfs_listxattr(struct dentry *d, 
83
 
                      size_t size);
84
 
 int vfs_setxattr(struct dentry *, struct vfsmount *, char *, void *, size_t,
85
 
                 int);
86
 
-int vfs_removexattr(struct dentry *, char *);
87
 
+int vfs_removexattr(struct dentry *, struct vfsmount *, char *);
88
 
 
89
 
 ssize_t generic_getxattr(struct dentry *dentry, const char *name, void *buffer, size_t size);
90
 
 ssize_t generic_listxattr(struct dentry *dentry, char *buffer, size_t buffer_size);