aboutsummaryrefslogtreecommitdiffstats
path: root/fs/f2fs
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk.kim@samsung.com>2012-12-26 00:39:50 -0500
committerJaegeuk Kim <jaegeuk.kim@samsung.com>2012-12-27 21:27:52 -0500
commit2b50638decdb9a8585654a5acf1c8ce5962f1951 (patch)
tree71887dfa0124dc314003af82cc23ad510ff880c3 /fs/f2fs
parentce19a5d4321911f98d42e4d724630ae48f413719 (diff)
f2fs: clean up unused variables and return values
This patch cleans up a couple of unnecessary codes related to unused variables and return values. Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs/f2fs')
-rw-r--r--fs/f2fs/gc.c12
-rw-r--r--fs/f2fs/hash.c4
-rw-r--r--fs/f2fs/node.c6
3 files changed, 5 insertions, 17 deletions
diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
index eda8230deb0c..b0ec721e984a 100644
--- a/fs/f2fs/gc.c
+++ b/fs/f2fs/gc.c
@@ -390,9 +390,7 @@ next_step:
390 } 390 }
391 391
392 err = check_valid_map(sbi, segno, off); 392 err = check_valid_map(sbi, segno, off);
393 if (err == GC_ERROR) 393 if (err == GC_NEXT)
394 return err;
395 else if (err == GC_NEXT)
396 continue; 394 continue;
397 395
398 if (initial) { 396 if (initial) {
@@ -550,9 +548,7 @@ next_step:
550 } 548 }
551 549
552 err = check_valid_map(sbi, segno, off); 550 err = check_valid_map(sbi, segno, off);
553 if (err == GC_ERROR) 551 if (err == GC_NEXT)
554 goto stop;
555 else if (err == GC_NEXT)
556 continue; 552 continue;
557 553
558 if (phase == 0) { 554 if (phase == 0) {
@@ -562,9 +558,7 @@ next_step:
562 558
563 /* Get an inode by ino with checking validity */ 559 /* Get an inode by ino with checking validity */
564 err = check_dnode(sbi, entry, &dni, start_addr + off, &nofs); 560 err = check_dnode(sbi, entry, &dni, start_addr + off, &nofs);
565 if (err == GC_ERROR) 561 if (err == GC_NEXT)
566 goto stop;
567 else if (err == GC_NEXT)
568 continue; 562 continue;
569 563
570 if (phase == 1) { 564 if (phase == 1) {
diff --git a/fs/f2fs/hash.c b/fs/f2fs/hash.c
index 5e48baca3597..6977415c52fc 100644
--- a/fs/f2fs/hash.c
+++ b/fs/f2fs/hash.c
@@ -71,7 +71,7 @@ static void str2hashbuf(const char *msg, int len, unsigned int *buf, int num)
71 71
72f2fs_hash_t f2fs_dentry_hash(const char *name, int len) 72f2fs_hash_t f2fs_dentry_hash(const char *name, int len)
73{ 73{
74 __u32 hash, minor_hash; 74 __u32 hash;
75 f2fs_hash_t f2fs_hash; 75 f2fs_hash_t f2fs_hash;
76 const char *p; 76 const char *p;
77 __u32 in[8], buf[4]; 77 __u32 in[8], buf[4];
@@ -94,8 +94,6 @@ f2fs_hash_t f2fs_dentry_hash(const char *name, int len)
94 p += 16; 94 p += 16;
95 } 95 }
96 hash = buf[0]; 96 hash = buf[0];
97 minor_hash = buf[1];
98
99 f2fs_hash = cpu_to_le32(hash & ~F2FS_HASH_COL_BIT); 97 f2fs_hash = cpu_to_le32(hash & ~F2FS_HASH_COL_BIT);
100 return f2fs_hash; 98 return f2fs_hash;
101} 99}
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index e85643cc74a9..5066bfd256c9 100644
--- a/fs/f2fs/node.c
+++ b/fs/f2fs/node.c
@@ -1088,7 +1088,6 @@ static int f2fs_write_node_page(struct page *page,
1088{ 1088{
1089 struct f2fs_sb_info *sbi = F2FS_SB(page->mapping->host->i_sb); 1089 struct f2fs_sb_info *sbi = F2FS_SB(page->mapping->host->i_sb);
1090 nid_t nid; 1090 nid_t nid;
1091 unsigned int nofs;
1092 block_t new_addr; 1091 block_t new_addr;
1093 struct node_info ni; 1092 struct node_info ni;
1094 1093
@@ -1105,7 +1104,6 @@ static int f2fs_write_node_page(struct page *page,
1105 1104
1106 /* get old block addr of this node page */ 1105 /* get old block addr of this node page */
1107 nid = nid_of_node(page); 1106 nid = nid_of_node(page);
1108 nofs = ofs_of_node(page);
1109 BUG_ON(page->index != nid); 1107 BUG_ON(page->index != nid);
1110 1108
1111 get_node_info(sbi, nid, &ni); 1109 get_node_info(sbi, nid, &ni);
@@ -1566,7 +1564,7 @@ void flush_nat_entries(struct f2fs_sb_info *sbi)
1566 nid_t nid; 1564 nid_t nid;
1567 struct f2fs_nat_entry raw_ne; 1565 struct f2fs_nat_entry raw_ne;
1568 int offset = -1; 1566 int offset = -1;
1569 block_t old_blkaddr, new_blkaddr; 1567 block_t new_blkaddr;
1570 1568
1571 ne = list_entry(cur, struct nat_entry, list); 1569 ne = list_entry(cur, struct nat_entry, list);
1572 nid = nat_get_nid(ne); 1570 nid = nat_get_nid(ne);
@@ -1580,7 +1578,6 @@ void flush_nat_entries(struct f2fs_sb_info *sbi)
1580 offset = lookup_journal_in_cursum(sum, NAT_JOURNAL, nid, 1); 1578 offset = lookup_journal_in_cursum(sum, NAT_JOURNAL, nid, 1);
1581 if (offset >= 0) { 1579 if (offset >= 0) {
1582 raw_ne = nat_in_journal(sum, offset); 1580 raw_ne = nat_in_journal(sum, offset);
1583 old_blkaddr = le32_to_cpu(raw_ne.block_addr);
1584 goto flush_now; 1581 goto flush_now;
1585 } 1582 }
1586to_nat_page: 1583to_nat_page:
@@ -1602,7 +1599,6 @@ to_nat_page:
1602 1599
1603 BUG_ON(!nat_blk); 1600 BUG_ON(!nat_blk);
1604 raw_ne = nat_blk->entries[nid - start_nid]; 1601 raw_ne = nat_blk->entries[nid - start_nid];
1605 old_blkaddr = le32_to_cpu(raw_ne.block_addr);
1606flush_now: 1602flush_now:
1607 new_blkaddr = nat_get_blkaddr(ne); 1603 new_blkaddr = nat_get_blkaddr(ne);
1608 1604