From: Hugh Dickins Date: Thu, 11 Sep 2008 08:57:55 +0000 (+0200) Subject: block: adjust blkdev_issue_discard for swap X-Git-Tag: v2.6.28-rc1~733^2~37 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3e6053d76dcbd92b2f9f4ad5ece9bce83149523e;p=pandora-kernel.git block: adjust blkdev_issue_discard for swap Two mods to blkdev_issue_discard(), thinking ahead to its use on swap: 1. Add gfp_mask argument, so swap allocation can use it where GFP_KERNEL might deadlock but GFP_NOIO is safe. 2. Enlarge nr_sects argument from unsigned to sector_t: unsigned long is enough to cover a whole swap area, but sector_t suits any partition. Change sb_issue_discard()'s nr_blocks to sector_t too; but no need seen for a gfp_mask there, just pass GFP_KERNEL down to blkdev_issue_discard(). Signed-off-by: Hugh Dickins Signed-off-by: Jens Axboe --- Reading git-diff-tree failed