diff options
author | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2013-11-27 22:55:13 -0500 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2013-12-22 20:18:04 -0500 |
commit | 031fa8cc9ba45c14f440b9cf71d09950fbe5eb9b (patch) | |
tree | c379f62d0014fd4371049181e9998e907671dbff | |
parent | f9a4e6df52edf8ce1040d1b8d340d31234a1bce3 (diff) |
f2fs: remove unnecessary condition checks
This patch removes the unnecessary condition checks on:
fs/f2fs/gc.c:667 do_garbage_collect() warn: 'sum_page' isn't an ERR_PTR
fs/f2fs/f2fs.h:795 f2fs_put_page() warn: 'page' isn't an ERR_PTR
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
-rw-r--r-- | fs/f2fs/f2fs.h | 2 | ||||
-rw-r--r-- | fs/f2fs/gc.c | 2 |
2 files changed, 1 insertions, 3 deletions
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index 1f1bc58d50ed..9a76c83937b1 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h | |||
@@ -792,7 +792,7 @@ static inline unsigned int valid_inode_count(struct f2fs_sb_info *sbi) | |||
792 | 792 | ||
793 | static inline void f2fs_put_page(struct page *page, int unlock) | 793 | static inline void f2fs_put_page(struct page *page, int unlock) |
794 | { | 794 | { |
795 | if (!page || IS_ERR(page)) | 795 | if (!page) |
796 | return; | 796 | return; |
797 | 797 | ||
798 | if (unlock) { | 798 | if (unlock) { |
diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index b7ad1ec7e4cc..5fa54c1ca33b 100644 --- a/fs/f2fs/gc.c +++ b/fs/f2fs/gc.c | |||
@@ -664,8 +664,6 @@ static void do_garbage_collect(struct f2fs_sb_info *sbi, unsigned int segno, | |||
664 | 664 | ||
665 | /* read segment summary of victim */ | 665 | /* read segment summary of victim */ |
666 | sum_page = get_sum_page(sbi, segno); | 666 | sum_page = get_sum_page(sbi, segno); |
667 | if (IS_ERR(sum_page)) | ||
668 | return; | ||
669 | 667 | ||
670 | blk_start_plug(&plug); | 668 | blk_start_plug(&plug); |
671 | 669 | ||