diff options
author | Filipe Manana <fdmanana@gmail.com> | 2014-03-18 17:56:06 +0000 |
---|---|---|
committer | Chris Mason <clm@fb.com> | 2014-03-20 17:15:28 -0700 |
commit | 425b5dafc8738d3d6d6b05827f40bd32bf04a20b (patch) | |
tree | 31f9a4b50c2ac23489fae606fcb35d47105fbc54 /fs/btrfs | |
parent | 21543baddcdbaa49db5ac8766ae564381e7c64d9 (diff) |
Btrfs: remove unnecessary inode generation lookup in send
No need to search in the send tree for the generation number of the inode,
we already have it in the recorded_ref structure passed to us.
Signed-off-by: Filipe David Borba Manana <fdmanana@gmail.com>
Reviewed-by: Liu Bo <bo.li.liu@oracle.com>
Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'fs/btrfs')
-rw-r--r-- | fs/btrfs/send.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c index 646369179697..92d4ae8a8ae6 100644 --- a/fs/btrfs/send.c +++ b/fs/btrfs/send.c @@ -3179,7 +3179,7 @@ static int wait_for_parent_move(struct send_ctx *sctx, int ret; u64 ino = parent_ref->dir; u64 parent_ino_before, parent_ino_after; - u64 new_gen, old_gen; + u64 old_gen; struct fs_path *path_before = NULL; struct fs_path *path_after = NULL; int len1, len2; @@ -3197,12 +3197,7 @@ static int wait_for_parent_move(struct send_ctx *sctx, else if (ret < 0) return ret; - ret = get_inode_info(sctx->send_root, ino, NULL, &new_gen, - NULL, NULL, NULL, NULL); - if (ret < 0) - return ret; - - if (new_gen != old_gen) + if (parent_ref->dir_gen != old_gen) return 0; path_before = fs_path_alloc(); |