diff options
author | David Sterba <dsterba@suse.com> | 2017-01-20 08:54:07 -0500 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2017-02-14 09:50:57 -0500 |
commit | f85b7379cd76ad25590c4059299b018eac6fbc50 (patch) | |
tree | 284d4f55b0abebebe37702990979132cec79e523 /fs/btrfs/tree-log.c | |
parent | f329e319714cd0d72479bae4e495ebedf765b2e4 (diff) |
btrfs: fix over-80 lines introduced by previous cleanups
This goes as a separate patch because fixing that inside the patches
caused too many many conflicts.
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/tree-log.c')
-rw-r--r-- | fs/btrfs/tree-log.c | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index 20fd7a6fd00d..010cf7685677 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree-log.c | |||
@@ -631,8 +631,8 @@ static noinline int replay_one_extent(struct btrfs_trans_handle *trans, | |||
631 | * file. This must be done before the btrfs_drop_extents run | 631 | * file. This must be done before the btrfs_drop_extents run |
632 | * so we don't try to drop this extent. | 632 | * so we don't try to drop this extent. |
633 | */ | 633 | */ |
634 | ret = btrfs_lookup_file_extent(trans, root, path, btrfs_ino(BTRFS_I(inode)), | 634 | ret = btrfs_lookup_file_extent(trans, root, path, |
635 | start, 0); | 635 | btrfs_ino(BTRFS_I(inode)), start, 0); |
636 | 636 | ||
637 | if (ret == 0 && | 637 | if (ret == 0 && |
638 | (found_type == BTRFS_FILE_EXTENT_REG || | 638 | (found_type == BTRFS_FILE_EXTENT_REG || |
@@ -1296,8 +1296,9 @@ static noinline int add_inode_ref(struct btrfs_trans_handle *trans, | |||
1296 | goto out; | 1296 | goto out; |
1297 | 1297 | ||
1298 | /* if we already have a perfect match, we're done */ | 1298 | /* if we already have a perfect match, we're done */ |
1299 | if (!inode_in_dir(root, path, btrfs_ino(BTRFS_I(dir)), btrfs_ino(BTRFS_I(inode)), | 1299 | if (!inode_in_dir(root, path, btrfs_ino(BTRFS_I(dir)), |
1300 | ref_index, name, namelen)) { | 1300 | btrfs_ino(BTRFS_I(inode)), ref_index, |
1301 | name, namelen)) { | ||
1301 | /* | 1302 | /* |
1302 | * look for a conflicting back reference in the | 1303 | * look for a conflicting back reference in the |
1303 | * metadata. if we find one we have to unlink that name | 1304 | * metadata. if we find one we have to unlink that name |
@@ -3676,7 +3677,8 @@ static noinline int copy_items(struct btrfs_trans_handle *trans, | |||
3676 | dst_path->slots[0], | 3677 | dst_path->slots[0], |
3677 | struct btrfs_inode_item); | 3678 | struct btrfs_inode_item); |
3678 | fill_inode_item(trans, dst_path->nodes[0], inode_item, | 3679 | fill_inode_item(trans, dst_path->nodes[0], inode_item, |
3679 | &inode->vfs_inode, inode_only == LOG_INODE_EXISTS, | 3680 | &inode->vfs_inode, |
3681 | inode_only == LOG_INODE_EXISTS, | ||
3680 | logged_isize); | 3682 | logged_isize); |
3681 | } else { | 3683 | } else { |
3682 | copy_extent_buffer(dst_path->nodes[0], src, dst_offset, | 3684 | copy_extent_buffer(dst_path->nodes[0], src, dst_offset, |
@@ -3826,7 +3828,8 @@ fill_holes: | |||
3826 | if (need_find_last_extent) { | 3828 | if (need_find_last_extent) { |
3827 | /* btrfs_prev_leaf could return 1 without releasing the path */ | 3829 | /* btrfs_prev_leaf could return 1 without releasing the path */ |
3828 | btrfs_release_path(src_path); | 3830 | btrfs_release_path(src_path); |
3829 | ret = btrfs_search_slot(NULL, inode->root, &first_key, src_path, 0, 0); | 3831 | ret = btrfs_search_slot(NULL, inode->root, &first_key, |
3832 | src_path, 0, 0); | ||
3830 | if (ret < 0) | 3833 | if (ret < 0) |
3831 | return ret; | 3834 | return ret; |
3832 | ASSERT(ret == 0); | 3835 | ASSERT(ret == 0); |
@@ -3881,7 +3884,7 @@ fill_holes: | |||
3881 | offset = *last_extent; | 3884 | offset = *last_extent; |
3882 | len = key.offset - *last_extent; | 3885 | len = key.offset - *last_extent; |
3883 | ret = btrfs_insert_file_extent(trans, log, btrfs_ino(inode), | 3886 | ret = btrfs_insert_file_extent(trans, log, btrfs_ino(inode), |
3884 | offset, 0, 0, len, 0, len, 0, 0, 0); | 3887 | offset, 0, 0, len, 0, len, 0, 0, 0); |
3885 | if (ret) | 3888 | if (ret) |
3886 | break; | 3889 | break; |
3887 | *last_extent = extent_end; | 3890 | *last_extent = extent_end; |
@@ -4071,8 +4074,8 @@ static int log_one_extent(struct btrfs_trans_handle *trans, | |||
4071 | int extent_inserted = 0; | 4074 | int extent_inserted = 0; |
4072 | bool ordered_io_err = false; | 4075 | bool ordered_io_err = false; |
4073 | 4076 | ||
4074 | ret = wait_ordered_extents(trans, &inode->vfs_inode, root, em, logged_list, | 4077 | ret = wait_ordered_extents(trans, &inode->vfs_inode, root, em, |
4075 | &ordered_io_err); | 4078 | logged_list, &ordered_io_err); |
4076 | if (ret) | 4079 | if (ret) |
4077 | return ret; | 4080 | return ret; |
4078 | 4081 | ||
@@ -5368,7 +5371,7 @@ static int btrfs_log_all_parents(struct btrfs_trans_handle *trans, | |||
5368 | ret = 1; | 5371 | ret = 1; |
5369 | if (!ret && ctx && ctx->log_new_dentries) | 5372 | if (!ret && ctx && ctx->log_new_dentries) |
5370 | ret = log_new_dir_dentries(trans, root, | 5373 | ret = log_new_dir_dentries(trans, root, |
5371 | BTRFS_I(dir_inode), ctx); | 5374 | BTRFS_I(dir_inode), ctx); |
5372 | iput(dir_inode); | 5375 | iput(dir_inode); |
5373 | if (ret) | 5376 | if (ret) |
5374 | goto out; | 5377 | goto out; |
@@ -5810,7 +5813,7 @@ int btrfs_log_new_name(struct btrfs_trans_handle *trans, | |||
5810 | struct dentry *parent) | 5813 | struct dentry *parent) |
5811 | { | 5814 | { |
5812 | struct btrfs_fs_info *fs_info = btrfs_sb(inode->vfs_inode.i_sb); | 5815 | struct btrfs_fs_info *fs_info = btrfs_sb(inode->vfs_inode.i_sb); |
5813 | struct btrfs_root * root = inode->root; | 5816 | struct btrfs_root *root = inode->root; |
5814 | 5817 | ||
5815 | /* | 5818 | /* |
5816 | * this will force the logging code to walk the dentry chain | 5819 | * this will force the logging code to walk the dentry chain |