~mathiaz/apparmor/ubuntu-mathiaz

« back to all changes in this revision

Viewing changes to kernel-patches/for-mainline/vfs-symlink.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:
15
15
 include/linux/fs.h  |    2 +-
16
16
 4 files changed, 16 insertions(+), 8 deletions(-)
17
17
 
18
 
--- a/fs/ecryptfs/inode.c
19
 
+++ b/fs/ecryptfs/inode.c
20
 
@@ -470,6 +470,7 @@ static int ecryptfs_symlink(struct inode
 
18
--- a/fs/ecryptfs/inode.c       2007-11-01 16:43:54.000000000 -0400
 
19
+++ b/fs/ecryptfs/inode.c       2007-11-01 16:47:29.000000000 -0400
 
20
@@ -461,6 +461,7 @@ static int ecryptfs_symlink(struct inode
21
21
 {
22
22
        int rc;
23
23
        struct dentry *lower_dentry;
25
25
        struct dentry *lower_dir_dentry;
26
26
        umode_t mode;
27
27
        char *encoded_symname;
28
 
@@ -478,6 +479,7 @@ static int ecryptfs_symlink(struct inode
 
28
@@ -469,6 +470,7 @@ static int ecryptfs_symlink(struct inode
29
29
 
30
30
        lower_dentry = ecryptfs_dentry_to_lower(dentry);
31
31
        dget(lower_dentry);
33
33
        lower_dir_dentry = lock_parent(lower_dentry);
34
34
        mode = S_IALLUGO;
35
35
        encoded_symlen = ecryptfs_encode_filename(crypt_stat, symname,
36
 
@@ -487,7 +489,7 @@ static int ecryptfs_symlink(struct inode
 
36
@@ -478,7 +480,7 @@ static int ecryptfs_symlink(struct inode
37
37
                rc = encoded_symlen;
38
38
                goto out_lock;
39
39
        }
42
42
                         encoded_symname, mode);
43
43
        kfree(encoded_symname);
44
44
        if (rc || !lower_dentry->d_inode)
45
 
--- a/fs/namei.c
46
 
+++ b/fs/namei.c
47
 
@@ -2236,7 +2236,8 @@ asmlinkage long sys_unlink(const char __
 
45
--- a/fs/namei.c        2007-11-01 16:47:26.000000000 -0400
 
46
+++ b/fs/namei.c        2007-11-01 16:47:29.000000000 -0400
 
47
@@ -2266,7 +2266,8 @@ asmlinkage long sys_unlink(const char __
48
48
        return do_unlinkat(AT_FDCWD, pathname);
49
49
 }
50
50
 
54
54
 {
55
55
        int error = may_create(dir, dentry, NULL);
56
56
 
57
 
@@ -2282,7 +2283,8 @@ asmlinkage long sys_symlinkat(const char
 
57
@@ -2312,7 +2313,8 @@ asmlinkage long sys_symlinkat(const char
58
58
        if (IS_ERR(dentry))
59
59
                goto out_unlock;
60
60
 
64
64
        dput(dentry);
65
65
 out_unlock:
66
66
        mutex_unlock(&nd.dentry->d_inode->i_mutex);
67
 
--- a/fs/nfsd/vfs.c
68
 
+++ b/fs/nfsd/vfs.c
69
 
@@ -1461,6 +1461,7 @@ nfsd_symlink(struct svc_rqst *rqstp, str
 
67
--- a/fs/nfsd/vfs.c     2007-11-01 16:43:54.000000000 -0400
 
68
+++ b/fs/nfsd/vfs.c     2007-11-01 16:47:29.000000000 -0400
 
69
@@ -1489,6 +1489,7 @@ nfsd_symlink(struct svc_rqst *rqstp, str
70
70
                                struct iattr *iap)
71
71
 {
72
72
        struct dentry   *dentry, *dnew;
74
74
        __be32          err, cerr;
75
75
        int             host_err;
76
76
        umode_t         mode;
77
 
@@ -1487,6 +1488,7 @@ nfsd_symlink(struct svc_rqst *rqstp, str
 
77
@@ -1515,6 +1516,7 @@ nfsd_symlink(struct svc_rqst *rqstp, str
78
78
        if (iap && (iap->ia_valid & ATTR_MODE))
79
79
                mode = iap->ia_mode & S_IALLUGO;
80
80
 
82
82
        if (unlikely(path[plen] != 0)) {
83
83
                char *path_alloced = kmalloc(plen+1, GFP_KERNEL);
84
84
                if (path_alloced == NULL)
85
 
@@ -1494,20 +1496,22 @@ nfsd_symlink(struct svc_rqst *rqstp, str
 
85
@@ -1522,20 +1524,22 @@ nfsd_symlink(struct svc_rqst *rqstp, str
86
86
                else {
87
87
                        strncpy(path_alloced, path, plen);
88
88
                        path_alloced[plen] = 0;
109
109
        dput(dnew);
110
110
        if (err==0) err = cerr;
111
111
 out:
112
 
--- a/include/linux/fs.h
113
 
+++ b/include/linux/fs.h
114
 
@@ -1012,7 +1012,7 @@ extern int vfs_permission(struct nameida
 
112
--- a/include/linux/fs.h        2007-11-01 16:43:54.000000000 -0400
 
113
+++ b/include/linux/fs.h        2007-11-01 16:47:29.000000000 -0400
 
114
@@ -1070,7 +1070,7 @@ extern int vfs_permission(struct nameida
115
115
 extern int vfs_create(struct inode *, struct dentry *, int, struct nameidata *);
116
116
 extern int vfs_mkdir(struct inode *, struct dentry *, struct vfsmount *, int);
117
117
 extern int vfs_mknod(struct inode *, struct dentry *, struct vfsmount *, int, dev_t);