f2fs: remove duplicated type casting
authorXiaojun Wang <wangxiaojun11@huawei.com>
Tue, 4 Aug 2020 13:46:04 +0000 (21:46 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Thu, 10 Sep 2020 21:03:29 +0000 (14:03 -0700)
Since DUMMY_WRITTEN_PAGE and ATOMIC_WRITTEN_PAGE have already been
converted as unsigned long type, we don't need do type casting again.

Signed-off-by: Xiaojun Wang <wangxiaojun11@huawei.com>
Reported-by: Jack Qiu <jack.qiu@huawei.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/data.c
fs/f2fs/f2fs.h
fs/f2fs/segment.c

index 73683e5..45256ac 100644 (file)
@@ -517,7 +517,7 @@ static inline void __submit_bio(struct f2fs_sb_info *sbi,
 
                        zero_user_segment(page, 0, PAGE_SIZE);
                        SetPagePrivate(page);
-                       set_page_private(page, (unsigned long)DUMMY_WRITTEN_PAGE);
+                       set_page_private(page, DUMMY_WRITTEN_PAGE);
                        lock_page(page);
                        if (bio_add_page(bio, page, PAGE_SIZE, 0) < PAGE_SIZE)
                                f2fs_bug_on(sbi, 1);
index 43abbdf..da31218 100644 (file)
@@ -1304,9 +1304,9 @@ enum fsync_mode {
 #define DUMMY_WRITTEN_PAGE             ((unsigned long)-2)
 
 #define IS_ATOMIC_WRITTEN_PAGE(page)                   \
-               (page_private(page) == (unsigned long)ATOMIC_WRITTEN_PAGE)
+               (page_private(page) == ATOMIC_WRITTEN_PAGE)
 #define IS_DUMMY_WRITTEN_PAGE(page)                    \
-               (page_private(page) == (unsigned long)DUMMY_WRITTEN_PAGE)
+               (page_private(page) == DUMMY_WRITTEN_PAGE)
 
 #ifdef CONFIG_F2FS_IO_TRACE
 #define IS_IO_TRACED_PAGE(page)                        \
index 6a8c92f..774582a 100644 (file)
@@ -189,7 +189,7 @@ void f2fs_register_inmem_page(struct inode *inode, struct page *page)
 
        f2fs_trace_pid(page);
 
-       f2fs_set_page_private(page, (unsigned long)ATOMIC_WRITTEN_PAGE);
+       f2fs_set_page_private(page, ATOMIC_WRITTEN_PAGE);
 
        new = f2fs_kmem_cache_alloc(inmem_entry_slab, GFP_NOFS);