summaryrefslogtreecommitdiff
path: root/libbcachefs/xattr.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2019-03-28 05:21:24 -0400
committerKent Overstreet <kent.overstreet@gmail.com>2019-03-28 05:28:38 -0400
commit133dfeb64843af65a018be770eb005363ca59bd9 (patch)
tree6d37383fdb83a5bc618ec506fd1e14c22d7a32c2 /libbcachefs/xattr.c
parent365d3450058ba0a8d282d8155bfcc2057837ab95 (diff)
Update bcachefs sources to d868a87c67 bcachefs: fix initial gc
Diffstat (limited to 'libbcachefs/xattr.c')
-rw-r--r--libbcachefs/xattr.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/libbcachefs/xattr.c b/libbcachefs/xattr.c
index b204b53..5ba52a3 100644
--- a/libbcachefs/xattr.c
+++ b/libbcachefs/xattr.c
@@ -270,12 +270,16 @@ ssize_t bch2_xattr_list(struct dentry *dentry, char *buffer, size_t buffer_size)
{
struct bch_fs *c = dentry->d_sb->s_fs_info;
struct bch_inode_info *inode = to_bch_ei(dentry->d_inode);
- struct btree_iter iter;
+ struct btree_trans trans;
+ struct btree_iter *iter;
struct bkey_s_c k;
u64 inum = dentry->d_inode->i_ino;
ssize_t ret = 0;
- for_each_btree_key(&iter, c, BTREE_ID_XATTRS, POS(inum, 0), 0, k) {
+ bch2_trans_init(&trans, c);
+
+ for_each_btree_key(&trans, iter, BTREE_ID_XATTRS,
+ POS(inum, 0), 0, k) {
BUG_ON(k.k->p.inode < inum);
if (k.k->p.inode > inum)
@@ -289,7 +293,7 @@ ssize_t bch2_xattr_list(struct dentry *dentry, char *buffer, size_t buffer_size)
if (ret < 0)
break;
}
- bch2_btree_iter_unlock(&iter);
+ bch2_trans_exit(&trans);
if (ret < 0)
return ret;