Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 457810 | Differences between
and this patch

Collapse All | Expand All

(-)a/fs/aufs/dynop.c (-9 / +15 lines)
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,
(-)a/fs/aufs/f_op_sp.c (-2 / +4 lines)
Lines 104-110 Link Here
104
static int aufs_open_sp(struct inode *inode, struct file *file);
104
static int aufs_open_sp(struct inode *inode, struct file *file);
105
static struct au_sp_fop {
105
static struct au_sp_fop {
106
	int			done;
106
	int			done;
107
	struct file_operations	fop;	/* not 'const' */
107
	file_operations_no_const	fop;	/* not 'const' */
108
	spinlock_t		spin;
108
	spinlock_t		spin;
109
} au_sp_fop[AuSp_Last] = {
109
} au_sp_fop[AuSp_Last] = {
110
	[AuSp_FIFO] = {
110
	[AuSp_FIFO] = {
Lines 157-164 Link Here
157
		h_file = au_hf_top(file);
157
		h_file = au_hf_top(file);
158
		spin_lock(&p->spin);
158
		spin_lock(&p->spin);
159
		if (!p->done) {
159
		if (!p->done) {
160
			p->fop = *h_file->f_op;
160
			pax_open_kernel();
161
			memcpy((void *)&p->fop, h_file->f_op, sizeof(p->fop));
161
			p->fop.owner = THIS_MODULE;
162
			p->fop.owner = THIS_MODULE;
163
			pax_close_kernel();
162
			if (p->fop.aio_read)
164
			if (p->fop.aio_read)
163
				p->fop.aio_read = aufs_aio_read_sp;
165
				p->fop.aio_read = aufs_aio_read_sp;
164
			if (p->fop.aio_write)
166
			if (p->fop.aio_write)

Return to bug 457810