[RFC PATCH 15/34] fscrypt: use bio_new in fscrypt_zeroout_range
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: linux-xfs@xxxxxxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx, dm-devel@xxxxxxxxxx, linux-block@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, drbd-dev@xxxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, linux-nvme@xxxxxxxxxxxxxxxxxxx, linux-scsi@xxxxxxxxxxxxxxx, target-devel@xxxxxxxxxxxxxxx, linux-fscrypt@xxxxxxxxxxxxxxx, jfs-discussion@xxxxxxxxxxxxxxxxxxxxx, linux-nilfs@xxxxxxxxxxxxxxx, ocfs2-devel@xxxxxxxxxxxxxx, linux-pm@xxxxxxxxxxxxxxx, linux-mm@xxxxxxxxx
- Subject: [RFC PATCH 15/34] fscrypt: use bio_new in fscrypt_zeroout_range
- From: Chaitanya Kulkarni <chaitanya.kulkarni@xxxxxxx>
- Date: Wed, 27 Jan 2021 23:11:14 -0800
- In-reply-to: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com>
- Ironport-sdr: tdWyFRxd620XWJuFvawJmxTWw9+7c+QjczKG+1obuVW++kUAeNuu+mDrnaG91IpUgCPtFkJbzz JTTsV+b2C93MtaS8YTXCyBrCW1VgBGaq6t+lR6WBOuQJW7i+f8w2FWjdnW5QhpbQZdvxc0m1mq FNXlimwFBLCYFm/UVLSY8+KDSV+l3Zlpb3RUeDvdj6496jLXYZJtDDV8Be67m2SMw6MQO0fMOt 7u4fNY/6o3iRmTu6uE5KUd/BUDhylzgIi1BQVrM5Z0p7GgPvVQbgvgmb6VpnF+pGfo1LT2mVVL j9o=
- Ironport-sdr: 7sG0ExNAA/Ej8af2uVQUSyD/z7nXcYmxX8mM9G4zbSfthkVJ/XTotk0mpQXJ0QcWDncyXPv85n VHtFcIVl4rFAhCKPTGl5SnvdXeucliOtTQmIgiNtCA4cGgUw7bktH8CYS2tnBda7A3PfrJGb88 onQStzzmI8j091bD49Z8TZvh171YJgSlbXmpFHF8qAyA0DvT89NPdEmMWmjpNxpGhpNRFuG6ME gSrrWo4JMjF1VO4jX7Krdu/oUrW2nnWAsnSzAo/zjfxSMa18lLEw9+E/NqsmJ3S5RzVXuq0pTn QlY9RKgbpdzQl1RziaqVXNYX
- Ironport-sdr: pB2cXSth9j9iO8qI9kro9aUnzxe7uC+CM4R5ezhi5mkNe3QJ3MeSZh+GGUOxW9ROBr/hgtgk35 3kQYC2KUTB+4qbQnoUg89GyqXiUICL6Lbb6/fLgPHrp+IuvY60iwR3VPtR6IrHib1STZYvjFII G0U9LFUNwbOn5ju9S5MOKHMAKhFoQxnYNKdJKA68HgaqnFN4j9YRc5HgIY3H1XVVcQBHwY13od d8yfo6WXgScVxvO/+aDCj5bBUi8Qq8LHMuAKgJFuukK9k/tSzy9sPaWEv7Xl8jluo8DC44HSzF bXE=
- References: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com>
- Wdcironportexception: Internal
Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@xxxxxxx>
---
fs/crypto/bio.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/fs/crypto/bio.c b/fs/crypto/bio.c
index b048a0e38516..20dab9bdf098 100644
--- a/fs/crypto/bio.c
+++ b/fs/crypto/bio.c
@@ -148,12 +148,11 @@ int fscrypt_zeroout_range(const struct inode *inode, pgoff_t lblk,
return -EINVAL;
/* This always succeeds since __GFP_DIRECT_RECLAIM is set. */
- bio = bio_alloc(GFP_NOFS, nr_pages);
+ bio = bio_alloc(inode->i_sb->s_bdev, 0, REQ_OP_WRITE, 0, nr_pages,
+ GFP_NOFS);
do {
- bio_set_dev(bio, inode->i_sb->s_bdev);
bio->bi_iter.bi_sector = pblk << (blockbits - 9);
- bio_set_op_attrs(bio, REQ_OP_WRITE, 0);
i = 0;
offset = 0;
--
2.22.1
[Index of Archives]
[linux Cryptography]
[Asterisk App Development]
[PJ SIP]
[Gnu Gatekeeper]
[IETF Sipping]
[Info Cyrus]
[ALSA User]
[Fedora Linux Users]
[Linux SCTP]
[DCCP]
[Gimp]
[Yosemite News]
[Deep Creek Hot Springs]
[Yosemite Campsites]
[ISDN Cause Codes]