aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/nilfs2/btree.c6
-rw-r--r--fs/nilfs2/direct.c3
2 files changed, 2 insertions, 7 deletions
diff --git a/fs/nilfs2/btree.c b/fs/nilfs2/btree.c
index 0543bf9f80ba..18bb965c66b5 100644
--- a/fs/nilfs2/btree.c
+++ b/fs/nilfs2/btree.c
@@ -555,17 +555,13 @@ static int nilfs_btree_lookup(const struct nilfs_bmap *btree,
555 __u64 key, int level, __u64 *ptrp) 555 __u64 key, int level, __u64 *ptrp)
556{ 556{
557 struct nilfs_btree_path *path; 557 struct nilfs_btree_path *path;
558 __u64 ptr;
559 int ret; 558 int ret;
560 559
561 path = nilfs_btree_alloc_path(); 560 path = nilfs_btree_alloc_path();
562 if (path == NULL) 561 if (path == NULL)
563 return -ENOMEM; 562 return -ENOMEM;
564 563
565 ret = nilfs_btree_do_lookup(btree, path, key, &ptr, level); 564 ret = nilfs_btree_do_lookup(btree, path, key, ptrp, level);
566
567 if (ptrp != NULL)
568 *ptrp = ptr;
569 565
570 nilfs_btree_free_path(path); 566 nilfs_btree_free_path(path);
571 567
diff --git a/fs/nilfs2/direct.c b/fs/nilfs2/direct.c
index 318613010106..324d80c57518 100644
--- a/fs/nilfs2/direct.c
+++ b/fs/nilfs2/direct.c
@@ -56,8 +56,7 @@ static int nilfs_direct_lookup(const struct nilfs_bmap *direct,
56 if (ptr == NILFS_BMAP_INVALID_PTR) 56 if (ptr == NILFS_BMAP_INVALID_PTR)
57 return -ENOENT; 57 return -ENOENT;
58 58
59 if (ptrp != NULL) 59 *ptrp = ptr;
60 *ptrp = ptr;
61 return 0; 60 return 0;
62} 61}
63 62