diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2010-02-22 07:48:51 -0500 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2010-02-22 07:48:51 -0500 |
commit | f11cbd74c5ff3614f6390b4de67a6ffdc614c378 (patch) | |
tree | 6a30920ade9eeaac5bf6d6263b5d09712e882eb0 /fs/nilfs2/direct.c | |
parent | 429c42c9d246f5bda868495c09974312a0177328 (diff) | |
parent | aea187c46f7d03ce985e55eb1398d0776a15b928 (diff) |
Merge branch 'master' into for-2.6.34
Diffstat (limited to 'fs/nilfs2/direct.c')
-rw-r--r-- | fs/nilfs2/direct.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/fs/nilfs2/direct.c b/fs/nilfs2/direct.c index d369ac718277..236753df5cdf 100644 --- a/fs/nilfs2/direct.c +++ b/fs/nilfs2/direct.c | |||
@@ -51,11 +51,11 @@ static int nilfs_direct_lookup(const struct nilfs_bmap *bmap, | |||
51 | struct nilfs_direct *direct; | 51 | struct nilfs_direct *direct; |
52 | __u64 ptr; | 52 | __u64 ptr; |
53 | 53 | ||
54 | direct = (struct nilfs_direct *)bmap; | 54 | direct = (struct nilfs_direct *)bmap; /* XXX: use macro for level 1 */ |
55 | if ((key > NILFS_DIRECT_KEY_MAX) || | 55 | if (key > NILFS_DIRECT_KEY_MAX || level != 1) |
56 | (level != 1) || /* XXX: use macro for level 1 */ | 56 | return -ENOENT; |
57 | ((ptr = nilfs_direct_get_ptr(direct, key)) == | 57 | ptr = nilfs_direct_get_ptr(direct, key); |
58 | NILFS_BMAP_INVALID_PTR)) | 58 | if (ptr == NILFS_BMAP_INVALID_PTR) |
59 | return -ENOENT; | 59 | return -ENOENT; |
60 | 60 | ||
61 | if (ptrp != NULL) | 61 | if (ptrp != NULL) |
@@ -73,9 +73,10 @@ static int nilfs_direct_lookup_contig(const struct nilfs_bmap *bmap, | |||
73 | sector_t blocknr; | 73 | sector_t blocknr; |
74 | int ret, cnt; | 74 | int ret, cnt; |
75 | 75 | ||
76 | if (key > NILFS_DIRECT_KEY_MAX || | 76 | if (key > NILFS_DIRECT_KEY_MAX) |
77 | (ptr = nilfs_direct_get_ptr(direct, key)) == | 77 | return -ENOENT; |
78 | NILFS_BMAP_INVALID_PTR) | 78 | ptr = nilfs_direct_get_ptr(direct, key); |
79 | if (ptr == NILFS_BMAP_INVALID_PTR) | ||
79 | return -ENOENT; | 80 | return -ENOENT; |
80 | 81 | ||
81 | if (NILFS_BMAP_USE_VBN(bmap)) { | 82 | if (NILFS_BMAP_USE_VBN(bmap)) { |