diff options
-rw-r--r-- | fs/nilfs2/btree.c | 6 | ||||
-rw-r--r-- | fs/nilfs2/direct.c | 3 |
2 files changed, 2 insertions, 7 deletions
diff --git a/fs/nilfs2/btree.c b/fs/nilfs2/btree.c index 0543bf9f80b..18bb965c66b 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, __u64 key, int level, __u64 *ptrp) { struct nilfs_btree_path *path; - __u64 ptr; int ret; path = nilfs_btree_alloc_path(); if (path == NULL) return -ENOMEM; - ret = nilfs_btree_do_lookup(btree, path, key, &ptr, level); - - if (ptrp != NULL) - *ptrp = ptr; + ret = nilfs_btree_do_lookup(btree, path, key, ptrp, level); nilfs_btree_free_path(path); diff --git a/fs/nilfs2/direct.c b/fs/nilfs2/direct.c index 31861301010..324d80c5751 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, if (ptr == NILFS_BMAP_INVALID_PTR) return -ENOENT; - if (ptrp != NULL) - *ptrp = ptr; + *ptrp = ptr; return 0; } |