]> git.pld-linux.org Git - packages/kernel.git/blob - kernel-aufs-fixes.patch
up to 6.7.6
[packages/kernel.git] / kernel-aufs-fixes.patch
1 ; https://github.com/sfjro/aufs-standalone/issues/35
2 ; from https://github.com/tombriden/linux/commits/linux-6.7.y
3 ;
4 From 29bbb4f7a4322a7dbbebb9ac80088ef02085457a Mon Sep 17 00:00:00 2001
5 From: Tom Briden <tom@decompile.me.uk>
6 Date: Fri, 22 Dec 2023 08:09:43 +0000
7 Subject: [PATCH] fix(aufs): apply fix from upstream
8
9 ---
10  fs/aufs/i_op.c | 7 ++++++-
11  1 file changed, 6 insertions(+), 1 deletion(-)
12
13 diff --git a/fs/aufs/i_op.c b/fs/aufs/i_op.c
14 index a5cc8743c2bca4..f64e465c37e8ae 100644
15 --- a/fs/aufs/i_op.c
16 +++ b/fs/aufs/i_op.c
17 @@ -1293,9 +1293,14 @@ static int aufs_getattr(struct mnt_idmap *idmap, const struct path *path,
18                 goto out_fill; /* pretending success */
19  
20         positive = d_is_positive(h_path.dentry);
21 -       if (positive)
22 +       if (positive) {
23                 /* no vfsub version */
24                 err = vfs_getattr(&h_path, st, request, query);
25 +               if (query & AT_GETATTR_NOSEC)
26 +                       err = vfs_getattr_nosec(&h_path, st, request, query);
27 +               else
28 +                       err = vfs_getattr(&h_path, st, request, query);
29 +       }
30         if (!err) {
31                 if (positive)
32                         au_refresh_iattr(inode, st,
33 From 4f20b6e23c56db7520a8416b752f7820920ec283 Mon Sep 17 00:00:00 2001
34 From: Tom Briden <tom@decompile.me.uk>
35 Date: Thu, 11 Jan 2024 11:20:23 +0000
36 Subject: [PATCH] aufs: fixes for linux-6.7.y
37
38 ---
39  fs/aufs/branch.c | 2 +-
40  fs/aufs/cpup.c   | 8 ++++----
41  fs/aufs/dir.c    | 2 +-
42  fs/aufs/i_op.c   | 4 ++--
43  fs/aufs/vfsub.h  | 2 +-
44  fs/namespace.c   | 1 -
45  fs/proc/base.c   | 2 +-
46  7 files changed, 10 insertions(+), 11 deletions(-)
47
48 diff --git a/fs/aufs/branch.c b/fs/aufs/branch.c
49 index 2a85d744d2b5f7..3ecc05573cc028 100644
50 --- a/fs/aufs/branch.c
51 +++ b/fs/aufs/branch.c
52 @@ -1293,7 +1293,7 @@ static int au_br_mod_files_ro(struct super_block *sb, aufs_bindex_t bindex)
53                         if (hf->f_mode & FMODE_READ)
54                                 i_readcount_inc(h_inode);
55                         put_write_access(h_inode);
56 -                       __mnt_drop_write(hf->f_path.mnt);
57 +                       mnt_put_write_access(hf->f_path.mnt);
58                 }
59         }
60  
61 diff --git a/fs/aufs/cpup.c b/fs/aufs/cpup.c
62 index 8c8bd5f7b28d81..3f09876a3bd5ee 100644
63 --- a/fs/aufs/cpup.c
64 +++ b/fs/aufs/cpup.c
65 @@ -133,8 +133,8 @@ void au_dtime_store(struct au_dtime *dt, struct dentry *dentry,
66         dt->dt_dentry = dentry;
67         dt->dt_h_path = *h_path;
68         h_inode = d_inode(h_path->dentry);
69 -       dt->dt_atime = h_inode->i_atime;
70 -       dt->dt_mtime = h_inode->i_mtime;
71 +       dt->dt_atime = h_inode->__i_atime;
72 +       dt->dt_mtime = h_inode->__i_mtime;
73         /* smp_mb(); */
74  }
75  
76 @@ -200,8 +200,8 @@ int cpup_iattr(struct dentry *dst, aufs_bindex_t bindex, struct path *h_src,
77         } else {
78                 ia.ia_uid = h_isrc->i_uid;
79                 ia.ia_gid = h_isrc->i_gid;
80 -               ia.ia_atime = h_isrc->i_atime;
81 -               ia.ia_mtime = h_isrc->i_mtime;
82 +               ia.ia_atime = h_isrc->__i_atime;
83 +               ia.ia_mtime = h_isrc->__i_mtime;
84                 if (h_idst->i_mode != h_isrc->i_mode
85                     && !S_ISLNK(h_idst->i_mode)) {
86                         ia.ia_valid |= ATTR_MODE;
87 diff --git a/fs/aufs/dir.c b/fs/aufs/dir.c
88 index ee900ea3264b22..e986deffef5e9e 100644
89 --- a/fs/aufs/dir.c
90 +++ b/fs/aufs/dir.c
91 @@ -145,7 +145,7 @@ static void au_do_dir_ts(void *arg)
92         au_hn_inode_lock_nested(hdir, AuLsc_I_PARENT);
93         h_dir = au_h_iptr(dir, btop);
94         if (h_dir->i_nlink
95 -           && timespec64_compare(&h_dir->i_mtime, &dt.dt_mtime) < 0) {
96 +           && timespec64_compare(&h_dir->__i_mtime, &dt.dt_mtime) < 0) {
97                 dt.dt_h_path = h_path;
98                 au_dtime_revert(&dt);
99         }
100 diff --git a/fs/aufs/i_op.c b/fs/aufs/i_op.c
101 index f64e465c37e8ae..020a88b719567c 100644
102 --- a/fs/aufs/i_op.c
103 +++ b/fs/aufs/i_op.c
104 @@ -1167,8 +1167,8 @@ static void au_refresh_iattr(struct inode *inode, struct kstat *st,
105         /* don't i_[ug]id_write() here */
106         inode->i_uid = st->uid;
107         inode->i_gid = st->gid;
108 -       inode->i_atime = st->atime;
109 -       inode->i_mtime = st->mtime;
110 +       inode->__i_atime = st->atime;
111 +       inode->__i_mtime = st->mtime;
112         inode_set_ctime_to_ts(inode, st->ctime);
113  
114         au_cpup_attr_nlink(inode, /*force*/0);
115 diff --git a/fs/aufs/vfsub.h b/fs/aufs/vfsub.h
116 index ed218d95770d0c..b45603c2d651bf 100644
117 --- a/fs/aufs/vfsub.h
118 +++ b/fs/aufs/vfsub.h
119 @@ -33,7 +33,7 @@
120  
121  /* copied from linux/fs/internal.h */
122  /* todo: BAD approach!! */
123 -extern void __mnt_drop_write(struct vfsmount *);
124 +extern void mnt_put_write_access(struct vfsmount *);
125  extern struct file *alloc_empty_file(int, const struct cred *);
126  
127  /* ---------------------------------------------------------------------- */
128 diff --git a/fs/namespace.c b/fs/namespace.c
129 index 1b942a6b72fa9f..07e2fee153f7f3 100644
130 --- a/fs/namespace.c
131 +++ b/fs/namespace.c
132 @@ -489,7 +489,6 @@ void mnt_put_write_access_file(struct file *file)
133         if (!(file->f_mode & FMODE_WRITER))
134                 mnt_put_write_access(file->f_path.mnt);
135  }
136 -EXPORT_SYMBOL_GPL(__mnt_drop_write);
137  
138  void mnt_drop_write_file(struct file *file)
139  {
140 diff --git a/fs/proc/base.c b/fs/proc/base.c
141 index dd31e3b6bf77cc..d4dcd73a765a20 100644
142 --- a/fs/proc/base.c
143 +++ b/fs/proc/base.c
144 @@ -2214,7 +2214,7 @@ static int map_files_get_link(struct dentry *dentry, struct path *path)
145         rc = -ENOENT;
146         vma = find_exact_vma(mm, vm_start, vm_end);
147         if (vma && vma->vm_file) {
148 -               *path = *file_user_path(vma->vm_file);
149 +               *path = vma_pr_or_file(vma)->f_path;
150                 path_get(path);
151                 rc = 0;
152         }
This page took 0.066116 seconds and 3 git commands to generate.