Commit 5ee581483246e832ca5a9fc1ac669bba0b6ec468
Committed by
Ryusuke Konishi
1 parent
6b7b284958
Exists in
master
and in
4 other branches
nilfs2: trivial coding style fix
This is a trivial style fix patch to mend errors/warnings reported by "checkpatch.pl --file". Signed-off-by: Jiro SEKIBA <jir@unicus.jp> Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Showing 3 changed files with 29 additions and 23 deletions Side-by-side Diff
fs/nilfs2/bmap.c
... | ... | @@ -417,8 +417,8 @@ |
417 | 417 | |
418 | 418 | key = page_index(bh->b_page) << (PAGE_CACHE_SHIFT - |
419 | 419 | bmap->b_inode->i_blkbits); |
420 | - for (pbh = page_buffers(bh->b_page); pbh != bh; | |
421 | - pbh = pbh->b_this_page, key++); | |
420 | + for (pbh = page_buffers(bh->b_page); pbh != bh; pbh = pbh->b_this_page) | |
421 | + key++; | |
422 | 422 | |
423 | 423 | return key; |
424 | 424 | } |
fs/nilfs2/cpfile.c
... | ... | @@ -328,19 +328,24 @@ |
328 | 328 | tnicps += nicps; |
329 | 329 | nilfs_mdt_mark_buffer_dirty(cp_bh); |
330 | 330 | nilfs_mdt_mark_dirty(cpfile); |
331 | - if (!nilfs_cpfile_is_in_first(cpfile, cno) && | |
332 | - (count = nilfs_cpfile_block_sub_valid_checkpoints( | |
333 | - cpfile, cp_bh, kaddr, nicps)) == 0) { | |
334 | - /* make hole */ | |
335 | - kunmap_atomic(kaddr, KM_USER0); | |
336 | - brelse(cp_bh); | |
337 | - ret = nilfs_cpfile_delete_checkpoint_block( | |
338 | - cpfile, cno); | |
339 | - if (ret == 0) | |
340 | - continue; | |
341 | - printk(KERN_ERR "%s: cannot delete block\n", | |
342 | - __func__); | |
343 | - break; | |
331 | + if (!nilfs_cpfile_is_in_first(cpfile, cno)) { | |
332 | + count = | |
333 | + nilfs_cpfile_block_sub_valid_checkpoints( | |
334 | + cpfile, cp_bh, kaddr, nicps); | |
335 | + if (count == 0) { | |
336 | + /* make hole */ | |
337 | + kunmap_atomic(kaddr, KM_USER0); | |
338 | + brelse(cp_bh); | |
339 | + ret = | |
340 | + nilfs_cpfile_delete_checkpoint_block( | |
341 | + cpfile, cno); | |
342 | + if (ret == 0) | |
343 | + continue; | |
344 | + printk(KERN_ERR | |
345 | + "%s: cannot delete block\n", | |
346 | + __func__); | |
347 | + break; | |
348 | + } | |
344 | 349 | } |
345 | 350 | } |
346 | 351 |
fs/nilfs2/direct.c
... | ... | @@ -51,12 +51,12 @@ |
51 | 51 | struct nilfs_direct *direct; |
52 | 52 | __u64 ptr; |
53 | 53 | |
54 | - direct = (struct nilfs_direct *)bmap; | |
55 | - if ((key > NILFS_DIRECT_KEY_MAX) || | |
56 | - (level != 1) || /* XXX: use macro for level 1 */ | |
57 | - ((ptr = nilfs_direct_get_ptr(direct, key)) == | |
58 | - NILFS_BMAP_INVALID_PTR)) | |
54 | + direct = (struct nilfs_direct *)bmap; /* XXX: use macro for level 1 */ | |
55 | + if (key > NILFS_DIRECT_KEY_MAX || level != 1) | |
59 | 56 | return -ENOENT; |
57 | + ptr = nilfs_direct_get_ptr(direct, key); | |
58 | + if (ptr == NILFS_BMAP_INVALID_PTR) | |
59 | + return -ENOENT; | |
60 | 60 | |
61 | 61 | if (ptrp != NULL) |
62 | 62 | *ptrp = ptr; |
... | ... | @@ -73,9 +73,10 @@ |
73 | 73 | sector_t blocknr; |
74 | 74 | int ret, cnt; |
75 | 75 | |
76 | - if (key > NILFS_DIRECT_KEY_MAX || | |
77 | - (ptr = nilfs_direct_get_ptr(direct, key)) == | |
78 | - NILFS_BMAP_INVALID_PTR) | |
76 | + if (key > NILFS_DIRECT_KEY_MAX) | |
77 | + return -ENOENT; | |
78 | + ptr = nilfs_direct_get_ptr(direct, key); | |
79 | + if (ptr == NILFS_BMAP_INVALID_PTR) | |
79 | 80 | return -ENOENT; |
80 | 81 | |
81 | 82 | if (NILFS_BMAP_USE_VBN(bmap)) { |