This is a preparation work, rename waiting_dir_move to send_dir_node.
We'd like to share waiting_dir_move structure in new did_create_dir() code.
Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
---
v2: fix wrong patch name.
fs/btrfs/send.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c
index 9dde971..33063d1 100644
--- a/fs/btrfs/send.c
+++ b/fs/btrfs/send.c
@@ -186,7 +186,7 @@ struct pending_dir_move {
struct list_head update_refs;
};
-struct waiting_dir_move {
+struct send_dir_node {
struct rb_node node;
u64 ino;
};
@@ -2741,10 +2741,10 @@ out:
static int is_waiting_for_move(struct send_ctx *sctx, u64 ino)
{
struct rb_node *n = sctx->waiting_dir_moves.rb_node;
- struct waiting_dir_move *entry;
+ struct send_dir_node *entry;
while (n) {
- entry = rb_entry(n, struct waiting_dir_move, node);
+ entry = rb_entry(n, struct send_dir_node, node);
if (ino < entry->ino)
n = n->rb_left;
else if (ino > entry->ino)
@@ -2759,7 +2759,7 @@ static int add_waiting_dir_move(struct send_ctx *sctx, u64
ino)
{
struct rb_node **p = &sctx->waiting_dir_moves.rb_node;
struct rb_node *parent = NULL;
- struct waiting_dir_move *entry, *dm;
+ struct send_dir_node *entry, *dm;
dm = kmalloc(sizeof(*dm), GFP_NOFS);
if (!dm)
@@ -2768,7 +2768,7 @@ static int add_waiting_dir_move(struct send_ctx *sctx, u64
ino)
while (*p) {
parent = *p;
- entry = rb_entry(parent, struct waiting_dir_move, node);
+ entry = rb_entry(parent, struct send_dir_node, node);
if (ino < entry->ino) {
p = &(*p)->rb_left;
} else if (ino > entry->ino) {
@@ -2787,10 +2787,10 @@ static int add_waiting_dir_move(struct send_ctx *sctx,
u64 ino)
static int del_waiting_dir_move(struct send_ctx *sctx, u64 ino)
{
struct rb_node *n = sctx->waiting_dir_moves.rb_node;
- struct waiting_dir_move *entry;
+ struct send_dir_node *entry;
while (n) {
- entry = rb_entry(n, struct waiting_dir_move, node);
+ entry = rb_entry(n, struct send_dir_node, node);
if (ino < entry->ino) {
n = n->rb_left;
} else if (ino > entry->ino) {
@@ -5469,10 +5469,10 @@ out:
WARN_ON(sctx && !ret &&
!RB_EMPTY_ROOT(&sctx->waiting_dir_moves));
while (sctx && !RB_EMPTY_ROOT(&sctx->waiting_dir_moves)) {
struct rb_node *n;
- struct waiting_dir_move *dm;
+ struct send_dir_node *dm;
n = rb_first(&sctx->waiting_dir_moves);
- dm = rb_entry(n, struct waiting_dir_move, node);
+ dm = rb_entry(n, struct send_dir_node, node);
rb_erase(&dm->node, &sctx->waiting_dir_moves);
kfree(dm);
}
--
1.8.2.1
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs"
in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html