Gentoo Archives: gentoo-commits

From: "Justin Lecher (jlec)" <jlec@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-fs/aufs3/files: pax-3.patch
Date: Wed, 01 May 2013 11:30:31
Message-Id: 20130501113027.A354D2171E@flycatcher.gentoo.org
1 jlec 13/05/01 11:30:27
2
3 Added: pax-3.patch
4 Log:
5 sys-fs/aufs3: Version Bump, take latest pax patch from pentoo, thanks Zero_Chaos for it
6
7 (Portage version: 2.2.0_alpha173/cvs/Linux x86_64, signed Manifest commit with key 8009D6F070EB7916)
8
9 Revision Changes Path
10 1.1 sys-fs/aufs3/files/pax-3.patch
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/aufs3/files/pax-3.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/aufs3/files/pax-3.patch?rev=1.1&content-type=text/plain
14
15 Index: pax-3.patch
16 ===================================================================
17 --- a/fs/aufs/dynop.c 2012-10-09 15:41:32.652989534 -0400
18 +++ b/fs/aufs/dynop.c 2012-10-09 15:41:58.562989820 -0400
19 @@ -149,9 +149,11 @@
20 #define DySet(func, dst, src, h_op, h_sb) do { \
21 DyDbgInc(cnt); \
22 if (h_op->func) { \
23 - if (src.func) \
24 - dst.func = src.func; \
25 - else \
26 + if (src.func) { \
27 + pax_open_kernel(); \
28 + *(void **)&dst.func = src.func; \
29 + pax_close_kernel(); \
30 + } else \
31 AuDbg("%s %s\n", au_sbtype(h_sb), #func); \
32 } \
33 } while (0)
34 @@ -159,7 +161,9 @@
35 #define DySetForce(func, dst, src) do { \
36 AuDebugOn(!src.func); \
37 DyDbgInc(cnt); \
38 - dst.func = src.func; \
39 + pax_open_kernel(); \
40 + *(void **)&dst.func = src.func; \
41 + pax_close_kernel(); \
42 } while (0)
43
44 #define DySetAop(func) \
45 @@ -266,15 +270,17 @@
46 */
47 static void dy_adx(struct au_dyaop *dyaop, int do_dx)
48 {
49 + pax_open_kernel();
50 if (!do_dx) {
51 - dyaop->da_op.direct_IO = NULL;
52 - dyaop->da_op.get_xip_mem = NULL;
53 + *(void **)&dyaop->da_op.direct_IO = NULL;
54 + *(void **)&dyaop->da_op.get_xip_mem = NULL;
55 } else {
56 - dyaop->da_op.direct_IO = aufs_aop.direct_IO;
57 - dyaop->da_op.get_xip_mem = aufs_aop.get_xip_mem;
58 + *(void **)&dyaop->da_op.direct_IO = aufs_aop.direct_IO;
59 + *(void **)&dyaop->da_op.get_xip_mem = aufs_aop.get_xip_mem;
60 if (!dyaop->da_get_xip_mem)
61 - dyaop->da_op.get_xip_mem = NULL;
62 + *(void **)&dyaop->da_op.get_xip_mem = NULL;
63 }
64 + pax_close_kernel();
65 }
66
67 static struct au_dyaop *dy_aget(struct au_branch *br,
68 --- a/fs/aufs/f_op_sp.c 2012-10-09 15:41:32.652989534 -0400
69 +++ b/fs/aufs/f_op_sp.c 2012-10-09 15:41:58.562989820 -0400
70 @@ -104,7 +104,7 @@
71 static int aufs_open_sp(struct inode *inode, struct file *file);
72 static struct au_sp_fop {
73 int done;
74 - struct file_operations fop; /* not 'const' */
75 + file_operations_no_const fop; /* not 'const' */
76 spinlock_t spin;
77 } au_sp_fop[AuSp_Last] = {
78 [AuSp_FIFO] = {
79 @@ -157,8 +157,10 @@
80 h_file = au_hf_top(file);
81 spin_lock(&p->spin);
82 if (!p->done) {
83 - p->fop = *h_file->f_op;
84 + pax_open_kernel();
85 + memcpy((void *)&p->fop, h_file->f_op, sizeof(p->fop));
86 p->fop.owner = THIS_MODULE;
87 + pax_close_kernel();
88 if (p->fop.aio_read)
89 p->fop.aio_read = aufs_aio_read_sp;
90 if (p->fop.aio_write)
91 diff -Naur linux-3.8.3-pentoo/fs/aufs/sysfs.c linux-3.8.3-pentoo-aufsfix/fs/aufs/sysfs.c
92 --- linux-3.8.3-pentoo/fs/aufs/sysfs.c 2013-04-29 00:07:50.478827567 -0400
93 +++ linux-3.8.3-pentoo-aufsfix/fs/aufs/sysfs.c 2013-04-28 23:46:23.724793109 -0400
94 @@ -208,8 +208,10 @@
95 struct attribute *attr = &br->br_attr;
96
97 sysfs_attr_init(attr);
98 - attr->name = br->br_name;
99 - attr->mode = S_IRUGO;
100 + pax_open_kernel();
101 + *(void **)&attr->name = br->br_name;
102 + *(void **)&attr->mode = S_IRUGO;
103 + pax_close_kernel();
104 }
105
106 void sysaufs_brs_del(struct super_block *sb, aufs_bindex_t bindex)