mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
mm, page_alloc: rename __GFP_WAIT to __GFP_RECLAIM
__GFP_WAIT was used to signal that the caller was in atomic context and could not sleep. Now it is possible to distinguish between true atomic context and callers that are not willing to sleep. The latter should clear __GFP_DIRECT_RECLAIM so kswapd will still wake. As clearing __GFP_WAIT behaves differently, there is a risk that people will clear the wrong flags. This patch renames __GFP_WAIT to __GFP_RECLAIM to clearly indicate what it does -- setting it allows all reclaim activity, clearing them prevents it. [[email protected]: fix build] [[email protected]: coding-style fixes] Signed-off-by: Mel Gorman <[email protected]> Acked-by: Michal Hocko <[email protected]> Acked-by: Vlastimil Babka <[email protected]> Acked-by: Johannes Weiner <[email protected]> Cc: Christoph Lameter <[email protected]> Acked-by: David Rientjes <[email protected]> Cc: Vitaly Wool <[email protected]> Cc: Rik van Riel <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
4011337083
commit
71baba4b92
38 changed files with 71 additions and 68 deletions
|
|
@ -92,7 +92,7 @@ int ide_queue_pc_tail(ide_drive_t *drive, struct gendisk *disk,
|
|||
struct request *rq;
|
||||
int error;
|
||||
|
||||
rq = blk_get_request(drive->queue, READ, __GFP_WAIT);
|
||||
rq = blk_get_request(drive->queue, READ, __GFP_RECLAIM);
|
||||
rq->cmd_type = REQ_TYPE_DRV_PRIV;
|
||||
rq->special = (char *)pc;
|
||||
|
||||
|
|
|
|||
|
|
@ -441,7 +441,7 @@ int ide_cd_queue_pc(ide_drive_t *drive, const unsigned char *cmd,
|
|||
struct request *rq;
|
||||
int error;
|
||||
|
||||
rq = blk_get_request(drive->queue, write, __GFP_WAIT);
|
||||
rq = blk_get_request(drive->queue, write, __GFP_RECLAIM);
|
||||
|
||||
memcpy(rq->cmd, cmd, BLK_MAX_CDB);
|
||||
rq->cmd_type = REQ_TYPE_ATA_PC;
|
||||
|
|
|
|||
|
|
@ -303,7 +303,7 @@ int ide_cdrom_reset(struct cdrom_device_info *cdi)
|
|||
struct request *rq;
|
||||
int ret;
|
||||
|
||||
rq = blk_get_request(drive->queue, READ, __GFP_WAIT);
|
||||
rq = blk_get_request(drive->queue, READ, __GFP_RECLAIM);
|
||||
rq->cmd_type = REQ_TYPE_DRV_PRIV;
|
||||
rq->cmd_flags = REQ_QUIET;
|
||||
ret = blk_execute_rq(drive->queue, cd->disk, rq, 0);
|
||||
|
|
|
|||
|
|
@ -165,7 +165,7 @@ int ide_devset_execute(ide_drive_t *drive, const struct ide_devset *setting,
|
|||
if (!(setting->flags & DS_SYNC))
|
||||
return setting->set(drive, arg);
|
||||
|
||||
rq = blk_get_request(q, READ, __GFP_WAIT);
|
||||
rq = blk_get_request(q, READ, __GFP_RECLAIM);
|
||||
rq->cmd_type = REQ_TYPE_DRV_PRIV;
|
||||
rq->cmd_len = 5;
|
||||
rq->cmd[0] = REQ_DEVSET_EXEC;
|
||||
|
|
|
|||
|
|
@ -477,7 +477,7 @@ static int set_multcount(ide_drive_t *drive, int arg)
|
|||
if (drive->special_flags & IDE_SFLAG_SET_MULTMODE)
|
||||
return -EBUSY;
|
||||
|
||||
rq = blk_get_request(drive->queue, READ, __GFP_WAIT);
|
||||
rq = blk_get_request(drive->queue, READ, __GFP_RECLAIM);
|
||||
rq->cmd_type = REQ_TYPE_ATA_TASKFILE;
|
||||
|
||||
drive->mult_req = arg;
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@ static int ide_cmd_ioctl(ide_drive_t *drive, unsigned long arg)
|
|||
if (NULL == (void *) arg) {
|
||||
struct request *rq;
|
||||
|
||||
rq = blk_get_request(drive->queue, READ, __GFP_WAIT);
|
||||
rq = blk_get_request(drive->queue, READ, __GFP_RECLAIM);
|
||||
rq->cmd_type = REQ_TYPE_ATA_TASKFILE;
|
||||
err = blk_execute_rq(drive->queue, NULL, rq, 0);
|
||||
blk_put_request(rq);
|
||||
|
|
@ -221,7 +221,7 @@ static int generic_drive_reset(ide_drive_t *drive)
|
|||
struct request *rq;
|
||||
int ret = 0;
|
||||
|
||||
rq = blk_get_request(drive->queue, READ, __GFP_WAIT);
|
||||
rq = blk_get_request(drive->queue, READ, __GFP_RECLAIM);
|
||||
rq->cmd_type = REQ_TYPE_DRV_PRIV;
|
||||
rq->cmd_len = 1;
|
||||
rq->cmd[0] = REQ_DRIVE_RESET;
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ static void issue_park_cmd(ide_drive_t *drive, unsigned long timeout)
|
|||
}
|
||||
spin_unlock_irq(&hwif->lock);
|
||||
|
||||
rq = blk_get_request(q, READ, __GFP_WAIT);
|
||||
rq = blk_get_request(q, READ, __GFP_RECLAIM);
|
||||
rq->cmd[0] = REQ_PARK_HEADS;
|
||||
rq->cmd_len = 1;
|
||||
rq->cmd_type = REQ_TYPE_DRV_PRIV;
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ int generic_ide_suspend(struct device *dev, pm_message_t mesg)
|
|||
}
|
||||
|
||||
memset(&rqpm, 0, sizeof(rqpm));
|
||||
rq = blk_get_request(drive->queue, READ, __GFP_WAIT);
|
||||
rq = blk_get_request(drive->queue, READ, __GFP_RECLAIM);
|
||||
rq->cmd_type = REQ_TYPE_ATA_PM_SUSPEND;
|
||||
rq->special = &rqpm;
|
||||
rqpm.pm_step = IDE_PM_START_SUSPEND;
|
||||
|
|
@ -88,7 +88,7 @@ int generic_ide_resume(struct device *dev)
|
|||
}
|
||||
|
||||
memset(&rqpm, 0, sizeof(rqpm));
|
||||
rq = blk_get_request(drive->queue, READ, __GFP_WAIT);
|
||||
rq = blk_get_request(drive->queue, READ, __GFP_RECLAIM);
|
||||
rq->cmd_type = REQ_TYPE_ATA_PM_RESUME;
|
||||
rq->cmd_flags |= REQ_PREEMPT;
|
||||
rq->special = &rqpm;
|
||||
|
|
|
|||
|
|
@ -852,7 +852,7 @@ static int idetape_queue_rw_tail(ide_drive_t *drive, int cmd, int size)
|
|||
BUG_ON(cmd != REQ_IDETAPE_READ && cmd != REQ_IDETAPE_WRITE);
|
||||
BUG_ON(size < 0 || size % tape->blk_size);
|
||||
|
||||
rq = blk_get_request(drive->queue, READ, __GFP_WAIT);
|
||||
rq = blk_get_request(drive->queue, READ, __GFP_RECLAIM);
|
||||
rq->cmd_type = REQ_TYPE_DRV_PRIV;
|
||||
rq->cmd[13] = cmd;
|
||||
rq->rq_disk = tape->disk;
|
||||
|
|
@ -860,7 +860,7 @@ static int idetape_queue_rw_tail(ide_drive_t *drive, int cmd, int size)
|
|||
|
||||
if (size) {
|
||||
ret = blk_rq_map_kern(drive->queue, rq, tape->buf, size,
|
||||
__GFP_WAIT);
|
||||
__GFP_RECLAIM);
|
||||
if (ret)
|
||||
goto out_put;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -430,7 +430,7 @@ int ide_raw_taskfile(ide_drive_t *drive, struct ide_cmd *cmd, u8 *buf,
|
|||
int error;
|
||||
int rw = !(cmd->tf_flags & IDE_TFLAG_WRITE) ? READ : WRITE;
|
||||
|
||||
rq = blk_get_request(drive->queue, rw, __GFP_WAIT);
|
||||
rq = blk_get_request(drive->queue, rw, __GFP_RECLAIM);
|
||||
rq->cmd_type = REQ_TYPE_ATA_TASKFILE;
|
||||
|
||||
/*
|
||||
|
|
@ -441,7 +441,7 @@ int ide_raw_taskfile(ide_drive_t *drive, struct ide_cmd *cmd, u8 *buf,
|
|||
*/
|
||||
if (nsect) {
|
||||
error = blk_rq_map_kern(drive->queue, rq, buf,
|
||||
nsect * SECTOR_SIZE, __GFP_WAIT);
|
||||
nsect * SECTOR_SIZE, __GFP_RECLAIM);
|
||||
if (error)
|
||||
goto put_req;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue