Lines 149-157
Link Here
|
149 |
#define DySet(func, dst, src, h_op, h_sb) do { \ |
149 |
#define DySet(func, dst, src, h_op, h_sb) do { \ |
150 |
DyDbgInc(cnt); \ |
150 |
DyDbgInc(cnt); \ |
151 |
if (h_op->func) { \ |
151 |
if (h_op->func) { \ |
152 |
if (src.func) \ |
152 |
if (src.func) { \ |
153 |
dst.func = src.func; \ |
153 |
pax_open_kernel(); \ |
154 |
else \ |
154 |
*(void **)&dst.func = src.func; \ |
|
|
155 |
pax_close_kernel(); \ |
156 |
} else \ |
155 |
AuDbg("%s %s\n", au_sbtype(h_sb), #func); \ |
157 |
AuDbg("%s %s\n", au_sbtype(h_sb), #func); \ |
156 |
} \ |
158 |
} \ |
157 |
} while (0) |
159 |
} while (0) |
Lines 159-165
Link Here
|
159 |
#define DySetForce(func, dst, src) do { \ |
161 |
#define DySetForce(func, dst, src) do { \ |
160 |
AuDebugOn(!src.func); \ |
162 |
AuDebugOn(!src.func); \ |
161 |
DyDbgInc(cnt); \ |
163 |
DyDbgInc(cnt); \ |
162 |
dst.func = src.func; \ |
164 |
pax_open_kernel(); \ |
|
|
165 |
*(void **)&dst.func = src.func; \ |
166 |
pax_close_kernel(); \ |
163 |
} while (0) |
167 |
} while (0) |
164 |
|
168 |
|
165 |
#define DySetAop(func) \ |
169 |
#define DySetAop(func) \ |
Lines 266-280
Link Here
|
266 |
*/ |
270 |
*/ |
267 |
static void dy_adx(struct au_dyaop *dyaop, int do_dx) |
271 |
static void dy_adx(struct au_dyaop *dyaop, int do_dx) |
268 |
{ |
272 |
{ |
|
|
273 |
pax_open_kernel(); |
269 |
if (!do_dx) { |
274 |
if (!do_dx) { |
270 |
dyaop->da_op.direct_IO = NULL; |
275 |
*(void **)&dyaop->da_op.direct_IO = NULL; |
271 |
dyaop->da_op.get_xip_mem = NULL; |
276 |
*(void **)&dyaop->da_op.get_xip_mem = NULL; |
272 |
} else { |
277 |
} else { |
273 |
dyaop->da_op.direct_IO = aufs_aop.direct_IO; |
278 |
*(void **)&dyaop->da_op.direct_IO = aufs_aop.direct_IO; |
274 |
dyaop->da_op.get_xip_mem = aufs_aop.get_xip_mem; |
279 |
*(void **)&dyaop->da_op.get_xip_mem = aufs_aop.get_xip_mem; |
275 |
if (!dyaop->da_get_xip_mem) |
280 |
if (!dyaop->da_get_xip_mem) |
276 |
dyaop->da_op.get_xip_mem = NULL; |
281 |
*(void **)&dyaop->da_op.get_xip_mem = NULL; |
277 |
} |
282 |
} |
|
|
283 |
pax_close_kernel(); |
278 |
} |
284 |
} |
279 |
|
285 |
|
280 |
static struct au_dyaop *dy_aget(struct au_branch *br, |
286 |
static struct au_dyaop *dy_aget(struct au_branch *br, |