summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2019-10-01 16:53:24 -0400
committerKent Overstreet <kent.overstreet@gmail.com>2020-11-07 16:57:16 -0500
commit4940af2f7bfc73b3f61f80934bd06cff96cd3ecf (patch)
treed4bd89eb09fa6690560a148587a86493e164a0f5
parentb26a6fcb4968e286d636f8fd234797c8babf2bf2 (diff)
foo
-rw-r--r--fs/bcachefs/fs-io.c8
-rw-r--r--fs/bcachefs/fs-ioctl.c11
-rw-r--r--fs/bcachefs/fs.c4
-rw-r--r--fs/bcachefs/fs.h2
-rw-r--r--fs/bcachefs/xattr.c2
5 files changed, 13 insertions, 14 deletions
diff --git a/fs/bcachefs/fs-io.c b/fs/bcachefs/fs-io.c
index f4dda639d1d2..ec0d17018f5a 100644
--- a/fs/bcachefs/fs-io.c
+++ b/fs/bcachefs/fs-io.c
@@ -170,7 +170,7 @@ struct inode_new_size {
unsigned fields;
};
-static int inode_set_size(struct bch_inode_info *inode,
+static int inode_set_size(struct btree_trans *trans,
struct bch_inode_unpacked *bi,
void *p)
{
@@ -2142,7 +2142,7 @@ static int bch2_truncate_page(struct bch_inode_info *inode, loff_t from)
from, round_up(from, PAGE_SIZE));
}
-static int bch2_extend_fn(struct bch_inode_info *inode,
+static int bch2_extend_fn(struct btree_trans *trans,
struct bch_inode_unpacked *bi,
void *p)
{
@@ -2179,7 +2179,7 @@ static int bch2_extend(struct bch_inode_info *inode,
return bch2_write_inode(c, inode, bch2_extend_fn, iattr);
}
-static int bch2_truncate_finish_fn(struct bch_inode_info *inode,
+static int bch2_truncate_finish_fn(struct btree_trans *trans,
struct bch_inode_unpacked *bi,
void *p)
{
@@ -2187,7 +2187,7 @@ static int bch2_truncate_finish_fn(struct bch_inode_info *inode,
return 0;
}
-static int bch2_truncate_start_fn(struct bch_inode_info *inode,
+static int bch2_truncate_start_fn(struct btree_trans *trans,
struct bch_inode_unpacked *bi, void *p)
{
struct bch_fs *c = inode->v.i_sb->s_fs_info;
diff --git a/fs/bcachefs/fs-ioctl.c b/fs/bcachefs/fs-ioctl.c
index a5e04d9b7f29..a064c6494972 100644
--- a/fs/bcachefs/fs-ioctl.c
+++ b/fs/bcachefs/fs-ioctl.c
@@ -21,11 +21,10 @@ struct flags_set {
unsigned projid;
};
-static int bch2_inode_flags_set(struct bch_inode_info *inode,
+static int bch2_inode_flags_set(struct btree_trans *trans,
struct bch_inode_unpacked *bi,
void *p)
{
- struct bch_fs *c = inode->v.i_sb->s_fs_info;
/*
* We're relying on btree locking here for exclusion with other ioctl
* calls - use the flags in the btree (@bi), not inode->i_flags:
@@ -46,7 +45,7 @@ static int bch2_inode_flags_set(struct bch_inode_info *inode,
bi->bi_flags &= ~s->mask;
bi->bi_flags |= newflags;
- bi->bi_ctime = timespec_to_bch2_time(c, current_time(&inode->v));
+ bi->bi_ctime = bch2_current_time(trans->c);
return 0;
}
@@ -101,7 +100,7 @@ static int bch2_ioc_fsgetxattr(struct bch_inode_info *inode,
return copy_to_user(arg, &fa, sizeof(fa));
}
-static int fssetxattr_inode_update_fn(struct bch_inode_info *inode,
+static int fssetxattr_inode_update_fn(struct btree_trans *trans,
struct bch_inode_unpacked *bi,
void *p)
{
@@ -112,7 +111,7 @@ static int fssetxattr_inode_update_fn(struct bch_inode_info *inode,
bi->bi_project = s->projid;
}
- return bch2_inode_flags_set(inode, bi, p);
+ return bch2_inode_flags_set(trans, bi, p);
}
static int bch2_ioc_fssetxattr(struct bch_fs *c,
@@ -161,7 +160,7 @@ err:
return ret;
}
-static int bch2_reinherit_attrs_fn(struct bch_inode_info *inode,
+static int bch2_reinherit_attrs_fn(struct btree_trans *trans,
struct bch_inode_unpacked *bi,
void *p)
{
diff --git a/fs/bcachefs/fs.c b/fs/bcachefs/fs.c
index 2a1d6d1689a6..5d9669801c6b 100644
--- a/fs/bcachefs/fs.c
+++ b/fs/bcachefs/fs.c
@@ -140,7 +140,7 @@ retry:
iter = bch2_inode_peek(&trans, &inode_u, inode->v.i_ino,
BTREE_ITER_INTENT);
ret = PTR_ERR_OR_ZERO(iter) ?:
- (set ? set(inode, &inode_u, p) : 0) ?:
+ (set ? set(&trans, &inode_u, p) : 0) ?:
bch2_inode_write(&trans, iter, &inode_u) ?:
bch2_trans_commit(&trans, NULL,
&inode->ei_journal_seq,
@@ -957,7 +957,7 @@ struct inode_update_times {
int flags;
};
-static int inode_update_times_fn(struct bch_inode_info *inode,
+static int inode_update_times_fn(struct btree_trans *trans,
struct bch_inode_unpacked *bi,
void *p)
{
diff --git a/fs/bcachefs/fs.h b/fs/bcachefs/fs.h
index 817c96f6f052..21cdf3567d97 100644
--- a/fs/bcachefs/fs.h
+++ b/fs/bcachefs/fs.h
@@ -145,7 +145,7 @@ static inline int bch2_set_projid(struct bch_fs *c,
struct inode *bch2_vfs_inode_get(struct bch_fs *, u64);
/* returns 0 if we want to do the update, or error is passed up */
-typedef int (*inode_set_fn)(struct bch_inode_info *,
+typedef int (*inode_set_fn)(struct btree_trans *,
struct bch_inode_unpacked *, void *);
void bch2_inode_update_after_write(struct bch_fs *,
diff --git a/fs/bcachefs/xattr.c b/fs/bcachefs/xattr.c
index 3f90477b1e73..563027ffec19 100644
--- a/fs/bcachefs/xattr.c
+++ b/fs/bcachefs/xattr.c
@@ -435,7 +435,7 @@ struct inode_opt_set {
bool defined;
};
-static int inode_opt_set_fn(struct bch_inode_info *inode,
+static int inode_opt_set_fn(struct btree_trans *trans,
struct bch_inode_unpacked *bi,
void *p)
{