aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-ioctl.c
diff options
context:
space:
mode:
authorAlasdair G Kergon <agk@redhat.com>2006-02-01 06:04:52 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-02-01 11:53:10 -0500
commitdab6a42915554f70220e5a2ff55c59c749582c7b (patch)
treecd8c11b9d8c2c57cc36b1920d21f787bd8cdd83b /drivers/md/dm-ioctl.c
parenta4fc4717fc55a3bcd3cfdafa285b7af164b83051 (diff)
[PATCH] device-mapper ioctl: reduce PF_MEMALLOC usage
Reduce substantially the amount of code using PF_MEMALLOC, as envisaged in the original FIXME. If you're using lvm2, for this patch to work correctly you should update to lvm2 version 2.02.01 or later and device-mapper version 1.02.02 or later. Signed-off-by: Alasdair G Kergon <agk@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/md/dm-ioctl.c')
-rw-r--r--drivers/md/dm-ioctl.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioctl.c
index 1235135b384b..442e2be6052e 100644
--- a/drivers/md/dm-ioctl.c
+++ b/drivers/md/dm-ioctl.c
@@ -1359,16 +1359,11 @@ static int ctl_ioctl(struct inode *inode, struct file *file,
1359 * Copy the parameters into kernel space. 1359 * Copy the parameters into kernel space.
1360 */ 1360 */
1361 r = copy_params(user, &param); 1361 r = copy_params(user, &param);
1362 if (r) {
1363 current->flags &= ~PF_MEMALLOC;
1364 return r;
1365 }
1366 1362
1367 /* 1363 current->flags &= ~PF_MEMALLOC;
1368 * FIXME: eventually we will remove the PF_MEMALLOC flag 1364
1369 * here. However the tools still do nasty things like 1365 if (r)
1370 * 'load' while a device is suspended. 1366 return r;
1371 */
1372 1367
1373 r = validate_params(cmd, param); 1368 r = validate_params(cmd, param);
1374 if (r) 1369 if (r)
@@ -1386,7 +1381,6 @@ static int ctl_ioctl(struct inode *inode, struct file *file,
1386 1381
1387 out: 1382 out:
1388 free_params(param); 1383 free_params(param);
1389 current->flags &= ~PF_MEMALLOC;
1390 return r; 1384 return r;
1391} 1385}
1392 1386