Loading fs/btrfs/delayed-inode.c +3 −2 Original line number Diff line number Diff line Loading @@ -72,7 +72,8 @@ static inline int btrfs_is_continuous_delayed_item( return 0; } static struct btrfs_delayed_node *btrfs_get_delayed_node(struct btrfs_inode *btrfs_inode) static struct btrfs_delayed_node *btrfs_get_delayed_node( struct btrfs_inode *btrfs_inode) { struct btrfs_root *root = btrfs_inode->root; u64 ino = btrfs_ino(btrfs_inode); Loading fs/btrfs/dir-item.c +1 −2 Original line number Diff line number Diff line Loading @@ -174,8 +174,7 @@ int btrfs_insert_dir_item(struct btrfs_trans_handle *trans, struct btrfs_root btrfs_release_path(path); ret2 = btrfs_insert_delayed_dir_index(trans, root->fs_info, name, name_len, BTRFS_I(dir), &disk_key, type, index); name_len, BTRFS_I(dir), &disk_key, type, index); out_free: btrfs_free_path(path); if (ret) Loading fs/btrfs/extent_io.c +5 −5 Original line number Diff line number Diff line Loading @@ -4413,8 +4413,8 @@ int extent_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo, * lookup the last file extent. We're not using i_size here * because there might be preallocation past i_size */ ret = btrfs_lookup_file_extent(NULL, root, path, btrfs_ino(BTRFS_I(inode)), -1, 0); ret = btrfs_lookup_file_extent(NULL, root, path, btrfs_ino(BTRFS_I(inode)), -1, 0); if (ret < 0) { btrfs_free_path(path); return ret; Loading fs/btrfs/file.c +2 −3 Original line number Diff line number Diff line Loading @@ -2285,9 +2285,8 @@ static int fill_holes(struct btrfs_trans_handle *trans, struct inode *inode, } btrfs_release_path(path); ret = btrfs_insert_file_extent(trans, root, btrfs_ino(BTRFS_I(inode)), offset, 0, 0, end - offset, 0, end - offset, 0, 0, 0); ret = btrfs_insert_file_extent(trans, root, btrfs_ino(BTRFS_I(inode)), offset, 0, 0, end - offset, 0, end - offset, 0, 0, 0); if (ret) return ret; Loading fs/btrfs/inode.c +39 −30 Original line number Diff line number Diff line Loading @@ -2182,8 +2182,7 @@ static int insert_reserved_file_extent(struct btrfs_trans_handle *trans, ins.offset = disk_num_bytes; ins.type = BTRFS_EXTENT_ITEM_KEY; ret = btrfs_alloc_reserved_file_extent(trans, root->root_key.objectid, btrfs_ino(BTRFS_I(inode)), file_pos, ram_bytes, &ins); btrfs_ino(BTRFS_I(inode)), file_pos, ram_bytes, &ins); /* * Release the reserved range from inode dirty range map, as it is * already moved into delayed_ref_head Loading Loading @@ -3314,7 +3313,8 @@ int btrfs_orphan_add(struct btrfs_trans_handle *trans, struct inode *inode) /* insert an orphan item to track this unlinked/truncated file */ if (insert >= 1) { ret = btrfs_insert_orphan_item(trans, root, btrfs_ino(BTRFS_I(inode))); ret = btrfs_insert_orphan_item(trans, root, btrfs_ino(BTRFS_I(inode))); if (ret) { atomic_dec(&root->orphan_inodes); if (reserve) { Loading Loading @@ -4863,8 +4863,8 @@ static int maybe_insert_hole(struct btrfs_root *root, struct inode *inode, return ret; } ret = btrfs_insert_file_extent(trans, root, btrfs_ino(BTRFS_I(inode)), offset, 0, 0, len, 0, len, 0, 0, 0); ret = btrfs_insert_file_extent(trans, root, btrfs_ino(BTRFS_I(inode)), offset, 0, 0, len, 0, len, 0, 0, 0); if (ret) btrfs_abort_transaction(trans, ret); else Loading Loading @@ -5422,8 +5422,8 @@ static int btrfs_inode_by_name(struct inode *dir, struct dentry *dentry, if (!path) return -ENOMEM; di = btrfs_lookup_dir_item(NULL, root, path, btrfs_ino(BTRFS_I(dir)), name, namelen, 0); di = btrfs_lookup_dir_item(NULL, root, path, btrfs_ino(BTRFS_I(dir)), name, namelen, 0); if (IS_ERR(di)) ret = PTR_ERR(di); Loading Loading @@ -7295,8 +7295,8 @@ noinline int can_nocow_extent(struct inode *inode, u64 offset, u64 *len, if (!path) return -ENOMEM; ret = btrfs_lookup_file_extent(NULL, root, path, btrfs_ino(BTRFS_I(inode)), offset, 0); ret = btrfs_lookup_file_extent(NULL, root, path, btrfs_ino(BTRFS_I(inode)), offset, 0); if (ret < 0) goto out; Loading Loading @@ -8245,7 +8245,8 @@ static void btrfs_end_dio_bio(struct bio *bio) if (err) btrfs_warn(BTRFS_I(dip->inode)->root->fs_info, "direct IO failed ino %llu rw %d,%u sector %#Lx len %u err no %d", btrfs_ino(BTRFS_I(dip->inode)), bio_op(bio), bio->bi_opf, btrfs_ino(BTRFS_I(dip->inode)), bio_op(bio), bio->bi_opf, (unsigned long long)bio->bi_iter.bi_sector, bio->bi_iter.bi_size, err); Loading Loading @@ -9560,7 +9561,8 @@ static int btrfs_rename_exchange(struct inode *old_dir, new_dentry->d_name.name, new_dentry->d_name.len, old_ino, btrfs_ino(BTRFS_I(new_dir)), old_idx); btrfs_ino(BTRFS_I(new_dir)), old_idx); if (ret) goto out_fail; } Loading @@ -9576,7 +9578,8 @@ static int btrfs_rename_exchange(struct inode *old_dir, old_dentry->d_name.name, old_dentry->d_name.len, new_ino, btrfs_ino(BTRFS_I(old_dir)), new_idx); btrfs_ino(BTRFS_I(old_dir)), new_idx); if (ret) goto out_fail; } Loading @@ -9592,8 +9595,10 @@ static int btrfs_rename_exchange(struct inode *old_dir, new_inode->i_ctime = ctime; if (old_dentry->d_parent != new_dentry->d_parent) { btrfs_record_unlink_dir(trans, BTRFS_I(old_dir), BTRFS_I(old_inode), 1); btrfs_record_unlink_dir(trans, BTRFS_I(new_dir), BTRFS_I(new_inode), 1); btrfs_record_unlink_dir(trans, BTRFS_I(old_dir), BTRFS_I(old_inode), 1); btrfs_record_unlink_dir(trans, BTRFS_I(new_dir), BTRFS_I(new_inode), 1); } /* src is a subvolume */ Loading Loading @@ -9659,13 +9664,15 @@ static int btrfs_rename_exchange(struct inode *old_dir, if (root_log_pinned) { parent = new_dentry->d_parent; btrfs_log_new_name(trans, BTRFS_I(old_inode), BTRFS_I(old_dir), parent); btrfs_log_new_name(trans, BTRFS_I(old_inode), BTRFS_I(old_dir), parent); btrfs_end_log_trans(root); root_log_pinned = false; } if (dest_log_pinned) { parent = old_dentry->d_parent; btrfs_log_new_name(trans, BTRFS_I(new_inode), BTRFS_I(new_dir), parent); btrfs_log_new_name(trans, BTRFS_I(new_inode), BTRFS_I(new_dir), parent); btrfs_end_log_trans(dest); dest_log_pinned = false; } Loading Loading @@ -9872,7 +9879,8 @@ static int btrfs_rename(struct inode *old_dir, struct dentry *old_dentry, old_inode->i_ctime = current_time(old_dir); if (old_dentry->d_parent != new_dentry->d_parent) btrfs_record_unlink_dir(trans, BTRFS_I(old_dir), BTRFS_I(old_inode), 1); btrfs_record_unlink_dir(trans, BTRFS_I(old_dir), BTRFS_I(old_inode), 1); if (unlikely(old_ino == BTRFS_FIRST_FREE_OBJECTID)) { root_objectid = BTRFS_I(old_inode)->root->root_key.objectid; Loading Loading @@ -9931,7 +9939,8 @@ static int btrfs_rename(struct inode *old_dir, struct dentry *old_dentry, if (log_pinned) { struct dentry *parent = new_dentry->d_parent; btrfs_log_new_name(trans, BTRFS_I(old_inode), BTRFS_I(old_dir), parent); btrfs_log_new_name(trans, BTRFS_I(old_inode), BTRFS_I(old_dir), parent); btrfs_end_log_trans(root); log_pinned = false; } Loading Loading @@ -10226,8 +10235,8 @@ static int btrfs_symlink(struct inode *dir, struct dentry *dentry, goto out_unlock; inode = btrfs_new_inode(trans, root, dir, dentry->d_name.name, dentry->d_name.len, btrfs_ino(BTRFS_I(dir)), objectid, S_IFLNK|S_IRWXUGO, &index); dentry->d_name.len, btrfs_ino(BTRFS_I(dir)), objectid, S_IFLNK|S_IRWXUGO, &index); if (IS_ERR(inode)) { err = PTR_ERR(inode); goto out_unlock; Loading Loading
fs/btrfs/delayed-inode.c +3 −2 Original line number Diff line number Diff line Loading @@ -72,7 +72,8 @@ static inline int btrfs_is_continuous_delayed_item( return 0; } static struct btrfs_delayed_node *btrfs_get_delayed_node(struct btrfs_inode *btrfs_inode) static struct btrfs_delayed_node *btrfs_get_delayed_node( struct btrfs_inode *btrfs_inode) { struct btrfs_root *root = btrfs_inode->root; u64 ino = btrfs_ino(btrfs_inode); Loading
fs/btrfs/dir-item.c +1 −2 Original line number Diff line number Diff line Loading @@ -174,8 +174,7 @@ int btrfs_insert_dir_item(struct btrfs_trans_handle *trans, struct btrfs_root btrfs_release_path(path); ret2 = btrfs_insert_delayed_dir_index(trans, root->fs_info, name, name_len, BTRFS_I(dir), &disk_key, type, index); name_len, BTRFS_I(dir), &disk_key, type, index); out_free: btrfs_free_path(path); if (ret) Loading
fs/btrfs/extent_io.c +5 −5 Original line number Diff line number Diff line Loading @@ -4413,8 +4413,8 @@ int extent_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo, * lookup the last file extent. We're not using i_size here * because there might be preallocation past i_size */ ret = btrfs_lookup_file_extent(NULL, root, path, btrfs_ino(BTRFS_I(inode)), -1, 0); ret = btrfs_lookup_file_extent(NULL, root, path, btrfs_ino(BTRFS_I(inode)), -1, 0); if (ret < 0) { btrfs_free_path(path); return ret; Loading
fs/btrfs/file.c +2 −3 Original line number Diff line number Diff line Loading @@ -2285,9 +2285,8 @@ static int fill_holes(struct btrfs_trans_handle *trans, struct inode *inode, } btrfs_release_path(path); ret = btrfs_insert_file_extent(trans, root, btrfs_ino(BTRFS_I(inode)), offset, 0, 0, end - offset, 0, end - offset, 0, 0, 0); ret = btrfs_insert_file_extent(trans, root, btrfs_ino(BTRFS_I(inode)), offset, 0, 0, end - offset, 0, end - offset, 0, 0, 0); if (ret) return ret; Loading
fs/btrfs/inode.c +39 −30 Original line number Diff line number Diff line Loading @@ -2182,8 +2182,7 @@ static int insert_reserved_file_extent(struct btrfs_trans_handle *trans, ins.offset = disk_num_bytes; ins.type = BTRFS_EXTENT_ITEM_KEY; ret = btrfs_alloc_reserved_file_extent(trans, root->root_key.objectid, btrfs_ino(BTRFS_I(inode)), file_pos, ram_bytes, &ins); btrfs_ino(BTRFS_I(inode)), file_pos, ram_bytes, &ins); /* * Release the reserved range from inode dirty range map, as it is * already moved into delayed_ref_head Loading Loading @@ -3314,7 +3313,8 @@ int btrfs_orphan_add(struct btrfs_trans_handle *trans, struct inode *inode) /* insert an orphan item to track this unlinked/truncated file */ if (insert >= 1) { ret = btrfs_insert_orphan_item(trans, root, btrfs_ino(BTRFS_I(inode))); ret = btrfs_insert_orphan_item(trans, root, btrfs_ino(BTRFS_I(inode))); if (ret) { atomic_dec(&root->orphan_inodes); if (reserve) { Loading Loading @@ -4863,8 +4863,8 @@ static int maybe_insert_hole(struct btrfs_root *root, struct inode *inode, return ret; } ret = btrfs_insert_file_extent(trans, root, btrfs_ino(BTRFS_I(inode)), offset, 0, 0, len, 0, len, 0, 0, 0); ret = btrfs_insert_file_extent(trans, root, btrfs_ino(BTRFS_I(inode)), offset, 0, 0, len, 0, len, 0, 0, 0); if (ret) btrfs_abort_transaction(trans, ret); else Loading Loading @@ -5422,8 +5422,8 @@ static int btrfs_inode_by_name(struct inode *dir, struct dentry *dentry, if (!path) return -ENOMEM; di = btrfs_lookup_dir_item(NULL, root, path, btrfs_ino(BTRFS_I(dir)), name, namelen, 0); di = btrfs_lookup_dir_item(NULL, root, path, btrfs_ino(BTRFS_I(dir)), name, namelen, 0); if (IS_ERR(di)) ret = PTR_ERR(di); Loading Loading @@ -7295,8 +7295,8 @@ noinline int can_nocow_extent(struct inode *inode, u64 offset, u64 *len, if (!path) return -ENOMEM; ret = btrfs_lookup_file_extent(NULL, root, path, btrfs_ino(BTRFS_I(inode)), offset, 0); ret = btrfs_lookup_file_extent(NULL, root, path, btrfs_ino(BTRFS_I(inode)), offset, 0); if (ret < 0) goto out; Loading Loading @@ -8245,7 +8245,8 @@ static void btrfs_end_dio_bio(struct bio *bio) if (err) btrfs_warn(BTRFS_I(dip->inode)->root->fs_info, "direct IO failed ino %llu rw %d,%u sector %#Lx len %u err no %d", btrfs_ino(BTRFS_I(dip->inode)), bio_op(bio), bio->bi_opf, btrfs_ino(BTRFS_I(dip->inode)), bio_op(bio), bio->bi_opf, (unsigned long long)bio->bi_iter.bi_sector, bio->bi_iter.bi_size, err); Loading Loading @@ -9560,7 +9561,8 @@ static int btrfs_rename_exchange(struct inode *old_dir, new_dentry->d_name.name, new_dentry->d_name.len, old_ino, btrfs_ino(BTRFS_I(new_dir)), old_idx); btrfs_ino(BTRFS_I(new_dir)), old_idx); if (ret) goto out_fail; } Loading @@ -9576,7 +9578,8 @@ static int btrfs_rename_exchange(struct inode *old_dir, old_dentry->d_name.name, old_dentry->d_name.len, new_ino, btrfs_ino(BTRFS_I(old_dir)), new_idx); btrfs_ino(BTRFS_I(old_dir)), new_idx); if (ret) goto out_fail; } Loading @@ -9592,8 +9595,10 @@ static int btrfs_rename_exchange(struct inode *old_dir, new_inode->i_ctime = ctime; if (old_dentry->d_parent != new_dentry->d_parent) { btrfs_record_unlink_dir(trans, BTRFS_I(old_dir), BTRFS_I(old_inode), 1); btrfs_record_unlink_dir(trans, BTRFS_I(new_dir), BTRFS_I(new_inode), 1); btrfs_record_unlink_dir(trans, BTRFS_I(old_dir), BTRFS_I(old_inode), 1); btrfs_record_unlink_dir(trans, BTRFS_I(new_dir), BTRFS_I(new_inode), 1); } /* src is a subvolume */ Loading Loading @@ -9659,13 +9664,15 @@ static int btrfs_rename_exchange(struct inode *old_dir, if (root_log_pinned) { parent = new_dentry->d_parent; btrfs_log_new_name(trans, BTRFS_I(old_inode), BTRFS_I(old_dir), parent); btrfs_log_new_name(trans, BTRFS_I(old_inode), BTRFS_I(old_dir), parent); btrfs_end_log_trans(root); root_log_pinned = false; } if (dest_log_pinned) { parent = old_dentry->d_parent; btrfs_log_new_name(trans, BTRFS_I(new_inode), BTRFS_I(new_dir), parent); btrfs_log_new_name(trans, BTRFS_I(new_inode), BTRFS_I(new_dir), parent); btrfs_end_log_trans(dest); dest_log_pinned = false; } Loading Loading @@ -9872,7 +9879,8 @@ static int btrfs_rename(struct inode *old_dir, struct dentry *old_dentry, old_inode->i_ctime = current_time(old_dir); if (old_dentry->d_parent != new_dentry->d_parent) btrfs_record_unlink_dir(trans, BTRFS_I(old_dir), BTRFS_I(old_inode), 1); btrfs_record_unlink_dir(trans, BTRFS_I(old_dir), BTRFS_I(old_inode), 1); if (unlikely(old_ino == BTRFS_FIRST_FREE_OBJECTID)) { root_objectid = BTRFS_I(old_inode)->root->root_key.objectid; Loading Loading @@ -9931,7 +9939,8 @@ static int btrfs_rename(struct inode *old_dir, struct dentry *old_dentry, if (log_pinned) { struct dentry *parent = new_dentry->d_parent; btrfs_log_new_name(trans, BTRFS_I(old_inode), BTRFS_I(old_dir), parent); btrfs_log_new_name(trans, BTRFS_I(old_inode), BTRFS_I(old_dir), parent); btrfs_end_log_trans(root); log_pinned = false; } Loading Loading @@ -10226,8 +10235,8 @@ static int btrfs_symlink(struct inode *dir, struct dentry *dentry, goto out_unlock; inode = btrfs_new_inode(trans, root, dir, dentry->d_name.name, dentry->d_name.len, btrfs_ino(BTRFS_I(dir)), objectid, S_IFLNK|S_IRWXUGO, &index); dentry->d_name.len, btrfs_ino(BTRFS_I(dir)), objectid, S_IFLNK|S_IRWXUGO, &index); if (IS_ERR(inode)) { err = PTR_ERR(inode); goto out_unlock; Loading