Loading fs/btrfs/async-thread.c +5 −5 Original line number Diff line number Diff line Loading @@ -92,7 +92,7 @@ __btrfs_alloc_workqueue(const char *name, int flags, int max_active, { struct __btrfs_workqueue *ret = kzalloc(sizeof(*ret), GFP_NOFS); if (unlikely(!ret)) if (!ret) return NULL; ret->max_active = max_active; Loading @@ -116,7 +116,7 @@ __btrfs_alloc_workqueue(const char *name, int flags, int max_active, ret->normal_wq = alloc_workqueue("%s-%s", flags, ret->max_active, "btrfs", name); if (unlikely(!ret->normal_wq)) { if (!ret->normal_wq) { kfree(ret); return NULL; } Loading @@ -138,12 +138,12 @@ struct btrfs_workqueue *btrfs_alloc_workqueue(const char *name, { struct btrfs_workqueue *ret = kzalloc(sizeof(*ret), GFP_NOFS); if (unlikely(!ret)) if (!ret) return NULL; ret->normal = __btrfs_alloc_workqueue(name, flags & ~WQ_HIGHPRI, max_active, thresh); if (unlikely(!ret->normal)) { if (!ret->normal) { kfree(ret); return NULL; } Loading @@ -151,7 +151,7 @@ struct btrfs_workqueue *btrfs_alloc_workqueue(const char *name, if (flags & WQ_HIGHPRI) { ret->high = __btrfs_alloc_workqueue(name, flags, max_active, thresh); if (unlikely(!ret->high)) { if (!ret->high) { __btrfs_destroy_workqueue(ret->normal); kfree(ret); return NULL; Loading fs/btrfs/extent-tree.c +2 −2 Original line number Diff line number Diff line Loading @@ -9690,7 +9690,7 @@ void btrfs_end_nocow_write(struct btrfs_root *root) int btrfs_start_nocow_write(struct btrfs_root *root) { if (unlikely(atomic_read(&root->will_be_snapshoted))) if (atomic_read(&root->will_be_snapshoted)) return 0; percpu_counter_inc(&root->subv_writers->counter); Loading @@ -9698,7 +9698,7 @@ int btrfs_start_nocow_write(struct btrfs_root *root) * Make sure counter is updated before we check for snapshot creation. */ smp_mb(); if (unlikely(atomic_read(&root->will_be_snapshoted))) { if (atomic_read(&root->will_be_snapshoted)) { btrfs_end_nocow_write(root); return 0; } Loading fs/btrfs/file.c +2 −2 Original line number Diff line number Diff line Loading @@ -452,7 +452,7 @@ static noinline int btrfs_copy_from_user(loff_t pos, int num_pages, if (unlikely(copied == 0)) break; if (unlikely(copied < PAGE_CACHE_SIZE - offset)) { if (copied < PAGE_CACHE_SIZE - offset) { offset += copied; } else { pg++; Loading Loading @@ -1792,7 +1792,7 @@ static ssize_t btrfs_file_write_iter(struct kiocb *iocb, if (sync) atomic_inc(&BTRFS_I(inode)->sync_writers); if (unlikely(file->f_flags & O_DIRECT)) { if (file->f_flags & O_DIRECT) { num_written = __btrfs_direct_write(iocb, from, pos); } else { num_written = __btrfs_buffered_write(file, from, pos); Loading fs/btrfs/inode.c +5 −5 Original line number Diff line number Diff line Loading @@ -7803,9 +7803,9 @@ static int btrfs_submit_direct_hook(int rw, struct btrfs_dio_private *dip, atomic_inc(&dip->pending_bios); while (bvec <= (orig_bio->bi_io_vec + orig_bio->bi_vcnt - 1)) { if (unlikely(map_length < submit_len + bvec->bv_len || if (map_length < submit_len + bvec->bv_len || bio_add_page(bio, bvec->bv_page, bvec->bv_len, bvec->bv_offset) < bvec->bv_len)) { bvec->bv_offset) < bvec->bv_len) { /* * inc the count before we submit the bio so * we know the end IO handler won't happen before Loading Loading @@ -8018,8 +8018,8 @@ static ssize_t btrfs_direct_IO(int rw, struct kiocb *iocb, ret = btrfs_delalloc_reserve_space(inode, count); if (ret) goto out; } else if (unlikely(test_bit(BTRFS_INODE_READDIO_NEED_LOCK, &BTRFS_I(inode)->runtime_flags))) { } else if (test_bit(BTRFS_INODE_READDIO_NEED_LOCK, &BTRFS_I(inode)->runtime_flags)) { inode_dio_done(inode); flags = DIO_LOCKING | DIO_SKIP_HOLES; wakeup = false; Loading Loading @@ -9014,7 +9014,7 @@ static int __start_delalloc_inodes(struct btrfs_root *root, int delay_iput, spin_unlock(&root->delalloc_lock); work = btrfs_alloc_delalloc_work(inode, 0, delay_iput); if (unlikely(!work)) { if (!work) { if (delay_iput) btrfs_add_delayed_iput(inode); else Loading fs/btrfs/ioctl.c +1 −1 Original line number Diff line number Diff line Loading @@ -3166,7 +3166,7 @@ static void clone_update_extent_map(struct inode *inode, em->start + em->len - 1, 0); } if (unlikely(ret)) if (ret) set_bit(BTRFS_INODE_NEEDS_FULL_SYNC, &BTRFS_I(inode)->runtime_flags); } Loading Loading
fs/btrfs/async-thread.c +5 −5 Original line number Diff line number Diff line Loading @@ -92,7 +92,7 @@ __btrfs_alloc_workqueue(const char *name, int flags, int max_active, { struct __btrfs_workqueue *ret = kzalloc(sizeof(*ret), GFP_NOFS); if (unlikely(!ret)) if (!ret) return NULL; ret->max_active = max_active; Loading @@ -116,7 +116,7 @@ __btrfs_alloc_workqueue(const char *name, int flags, int max_active, ret->normal_wq = alloc_workqueue("%s-%s", flags, ret->max_active, "btrfs", name); if (unlikely(!ret->normal_wq)) { if (!ret->normal_wq) { kfree(ret); return NULL; } Loading @@ -138,12 +138,12 @@ struct btrfs_workqueue *btrfs_alloc_workqueue(const char *name, { struct btrfs_workqueue *ret = kzalloc(sizeof(*ret), GFP_NOFS); if (unlikely(!ret)) if (!ret) return NULL; ret->normal = __btrfs_alloc_workqueue(name, flags & ~WQ_HIGHPRI, max_active, thresh); if (unlikely(!ret->normal)) { if (!ret->normal) { kfree(ret); return NULL; } Loading @@ -151,7 +151,7 @@ struct btrfs_workqueue *btrfs_alloc_workqueue(const char *name, if (flags & WQ_HIGHPRI) { ret->high = __btrfs_alloc_workqueue(name, flags, max_active, thresh); if (unlikely(!ret->high)) { if (!ret->high) { __btrfs_destroy_workqueue(ret->normal); kfree(ret); return NULL; Loading
fs/btrfs/extent-tree.c +2 −2 Original line number Diff line number Diff line Loading @@ -9690,7 +9690,7 @@ void btrfs_end_nocow_write(struct btrfs_root *root) int btrfs_start_nocow_write(struct btrfs_root *root) { if (unlikely(atomic_read(&root->will_be_snapshoted))) if (atomic_read(&root->will_be_snapshoted)) return 0; percpu_counter_inc(&root->subv_writers->counter); Loading @@ -9698,7 +9698,7 @@ int btrfs_start_nocow_write(struct btrfs_root *root) * Make sure counter is updated before we check for snapshot creation. */ smp_mb(); if (unlikely(atomic_read(&root->will_be_snapshoted))) { if (atomic_read(&root->will_be_snapshoted)) { btrfs_end_nocow_write(root); return 0; } Loading
fs/btrfs/file.c +2 −2 Original line number Diff line number Diff line Loading @@ -452,7 +452,7 @@ static noinline int btrfs_copy_from_user(loff_t pos, int num_pages, if (unlikely(copied == 0)) break; if (unlikely(copied < PAGE_CACHE_SIZE - offset)) { if (copied < PAGE_CACHE_SIZE - offset) { offset += copied; } else { pg++; Loading Loading @@ -1792,7 +1792,7 @@ static ssize_t btrfs_file_write_iter(struct kiocb *iocb, if (sync) atomic_inc(&BTRFS_I(inode)->sync_writers); if (unlikely(file->f_flags & O_DIRECT)) { if (file->f_flags & O_DIRECT) { num_written = __btrfs_direct_write(iocb, from, pos); } else { num_written = __btrfs_buffered_write(file, from, pos); Loading
fs/btrfs/inode.c +5 −5 Original line number Diff line number Diff line Loading @@ -7803,9 +7803,9 @@ static int btrfs_submit_direct_hook(int rw, struct btrfs_dio_private *dip, atomic_inc(&dip->pending_bios); while (bvec <= (orig_bio->bi_io_vec + orig_bio->bi_vcnt - 1)) { if (unlikely(map_length < submit_len + bvec->bv_len || if (map_length < submit_len + bvec->bv_len || bio_add_page(bio, bvec->bv_page, bvec->bv_len, bvec->bv_offset) < bvec->bv_len)) { bvec->bv_offset) < bvec->bv_len) { /* * inc the count before we submit the bio so * we know the end IO handler won't happen before Loading Loading @@ -8018,8 +8018,8 @@ static ssize_t btrfs_direct_IO(int rw, struct kiocb *iocb, ret = btrfs_delalloc_reserve_space(inode, count); if (ret) goto out; } else if (unlikely(test_bit(BTRFS_INODE_READDIO_NEED_LOCK, &BTRFS_I(inode)->runtime_flags))) { } else if (test_bit(BTRFS_INODE_READDIO_NEED_LOCK, &BTRFS_I(inode)->runtime_flags)) { inode_dio_done(inode); flags = DIO_LOCKING | DIO_SKIP_HOLES; wakeup = false; Loading Loading @@ -9014,7 +9014,7 @@ static int __start_delalloc_inodes(struct btrfs_root *root, int delay_iput, spin_unlock(&root->delalloc_lock); work = btrfs_alloc_delalloc_work(inode, 0, delay_iput); if (unlikely(!work)) { if (!work) { if (delay_iput) btrfs_add_delayed_iput(inode); else Loading
fs/btrfs/ioctl.c +1 −1 Original line number Diff line number Diff line Loading @@ -3166,7 +3166,7 @@ static void clone_update_extent_map(struct inode *inode, em->start + em->len - 1, 0); } if (unlikely(ret)) if (ret) set_bit(BTRFS_INODE_NEEDS_FULL_SYNC, &BTRFS_I(inode)->runtime_flags); } Loading