Update direct callers of btrfs_bio_clone that do error handling, that we
can now remove.

Signed-off-by: David Sterba <dste...@suse.com>
---
 fs/btrfs/inode.c   | 4 ----
 fs/btrfs/volumes.c | 1 -
 2 files changed, 5 deletions(-)

diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 0a1ec5cd3b8f..c8ed81edd40e 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -8584,10 +8584,6 @@ static void btrfs_submit_direct(struct bio *dio_bio, 
struct inode *inode,
        skip_sum = BTRFS_I(inode)->flags & BTRFS_INODE_NODATASUM;
 
        bio = btrfs_bio_clone(dio_bio, GFP_NOFS);
-       if (!bio) {
-               ret = -ENOMEM;
-               goto free_ordered;
-       }
 
        dip = kzalloc(sizeof(*dip), GFP_NOFS);
        if (!dip) {
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index e28c113785bb..864b203cc4aa 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -6257,7 +6257,6 @@ int btrfs_map_bio(struct btrfs_fs_info *fs_info, struct 
bio *bio,
 
                if (dev_nr < total_devs - 1) {
                        bio = btrfs_bio_clone(first_bio, GFP_NOFS);
-                       BUG_ON(!bio); /* -ENOMEM */
                } else
                        bio = first_bio;
 
-- 
2.12.0

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to