Signed-off-by: Chaitanya Kulkarni <chaitanya.kulka...@wdc.com>
---
 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

Reply via email to