diff options
author | Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> | 2010-07-13 10:33:51 -0400 |
---|---|---|
committer | Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> | 2010-07-22 21:02:14 -0400 |
commit | 364ec2d700223b965620ff4d5031a3665d195873 (patch) | |
tree | 2cf23dbf1ce4de2125c62f6804f4c672a4127096 /fs/nilfs2/btree.c | |
parent | 05d0e94b66dbdf9d90371b39dc7a6b390ba74d41 (diff) |
nilfs2: remove redundant pointer checks in bmap lookup functions
nilfs_bmap_lookup and its variants are supposed to take a valid
pointer argument to return a block address, thus pointer checks in
nilfs_btree_lookup and nilfs_direct_lookup are needless.
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Diffstat (limited to 'fs/nilfs2/btree.c')
-rw-r--r-- | fs/nilfs2/btree.c | 6 |
1 files changed, 1 insertions, 5 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 | ||