| To: | axboe <axboe@xxxxxxxxx>, "konrad.wilk" <konrad.wilk@xxxxxxxxxx>, "chris.mason" <chris.mason@xxxxxxxxxxxx>, viro <viro@xxxxxxxxxxxxxxxxxx>, tytso <tytso@xxxxxxx>, "adilger.kernel" <adilger.kernel@xxxxxxxxx>, shaggy <shaggy@xxxxxxxxxx>, mfasheh <mfasheh@xxxxxxxx>, jlbec <jlbec@xxxxxxxxxxxx>, bpm <bpm@xxxxxxx>, elder <elder@xxxxxxxxxx> |
|---|---|
| Subject: | [PATCH 4/8] fs/direct-io.c:Evalue bio->bi_rw after calling bio_alloc() and before calling bio_add_page(). |
| From: | majianpeng <majianpeng@xxxxxxxxx> |
| Date: | Mon, 30 Jul 2012 15:24:06 +0800 |
| Cc: | linux-kernel <linux-kernel@xxxxxxxxxxxxxxx>, linux-btrfs <linux-btrfs@xxxxxxxxxxxxxxx>, linux-fsdevel <linux-fsdevel@xxxxxxxxxxxxxxx>, linux-ext4 <linux-ext4@xxxxxxxxxxxxxxx>, jfs-discussion <jfs-discussion@xxxxxxxxxxxxxxxxxxxxx>, xfs <xfs@xxxxxxxxxxx> |
| Dkim-signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:x-priority:x-has-attach:x-mailer :mime-version:message-id:content-type:content-transfer-encoding; bh=JnuGaP5CRsJ8Obd+0SmKSFRpVqioVqXN57D176efEso=; b=rqsH3ni3L0+VN4h4wFcvqCDHyTtrAs5200LyNFva3++iRuFamECqmFaHh9IWWdBVPq cbn++LMeugIx1A8UUH+2Nr60VlW/FsEXUji5HoL9mFkSBk7JTbeQDM1O6wUrHNQAEp0b 0g4Y5DGbhurKFPYOi/QCknQgy3L7BRc22ZEIfVPCHnlrGtTtigMgQUmCxRamc2HoCkHF WRYwfCFHvi6YXWrpaOfdqAE0YQBATPlmv3W66OfXVyz+8VqBQ+ZmTZ6kocIE0bbWxllz Bv/2TN3JzYl0rb5nYQYA5AKWoxCtfjSZ9TdO1U4cmyaH9GK3pXW9l2Z2c6a1Qni5OZ3T oFuw== |
Because call bio_alloc, the bi_rw is zero by default,but in
bio_add_page used the bi_rw. So evalue bi_rw.
Signed-off-by: Jianpeng Ma <majianpeng@xxxxxxxxx>
---
fs/direct-io.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/direct-io.c b/fs/direct-io.c
index 1faf4cb..77f0bbf 100644
--- a/fs/direct-io.c
+++ b/fs/direct-io.c
@@ -349,6 +349,7 @@ dio_bio_alloc(struct dio *dio, struct dio_submit *sdio,
bio->bi_bdev = bdev;
bio->bi_sector = first_sector;
+ bio->bi_rw = dio->rw;
if (dio->is_async)
bio->bi_end_io = dio_bio_end_aio;
else
--
1.7.9.5
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [PATCH 2/8] drivers/block/xen-blkback:Evalue bio->bi_rw after calling bio_alloc() and before calling bio_add_page()., majianpeng |
|---|---|
| Next by Date: | [PATCH 3/8]fs/btrfs: Evalue bio->bi_rw after calling bio_alloc() and before calling bio_add_page()., majianpeng |
| Previous by Thread: | [PATCH 2/8] drivers/block/xen-blkback:Evalue bio->bi_rw after calling bio_alloc() and before calling bio_add_page()., majianpeng |
| Next by Thread: | [PATCH 3/8]fs/btrfs: Evalue bio->bi_rw after calling bio_alloc() and before calling bio_add_page()., majianpeng |
| Indexes: | [Date] [Thread] [Top] [All Lists] |