diff options
author | Chao Yu <chao2.yu@samsung.com> | 2015-12-15 00:29:47 -0500 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2015-12-15 16:23:43 -0500 |
commit | a49324f127dec918f5a3b3f145d0bf2fb81f4588 (patch) | |
tree | b779dbb8912eb946aa6b8f70eaaf604c963b2e82 /fs/f2fs | |
parent | a11fac3776fc4db6a9fa1104b1d0477809c677e0 (diff) |
f2fs: rename {add,remove,release}_dirty_inode to {add,remove,release}_ino_entry
remove_dirty_dir_inode will be renamed to remove_dirty_inode as a generic
function in following patch for removing directory/regular/symlink inode
in global dirty list.
Here rename ino management related functions for readability, also in
order to avoid name conflict.
Signed-off-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs')
-rw-r--r-- | fs/f2fs/checkpoint.c | 8 | ||||
-rw-r--r-- | fs/f2fs/f2fs.h | 6 | ||||
-rw-r--r-- | fs/f2fs/file.c | 4 | ||||
-rw-r--r-- | fs/f2fs/inode.c | 4 | ||||
-rw-r--r-- | fs/f2fs/super.c | 2 |
5 files changed, 12 insertions, 12 deletions
diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c index f661d80474be..b839f5f3385c 100644 --- a/fs/f2fs/checkpoint.c +++ b/fs/f2fs/checkpoint.c | |||
@@ -410,13 +410,13 @@ static void __remove_ino_entry(struct f2fs_sb_info *sbi, nid_t ino, int type) | |||
410 | spin_unlock(&im->ino_lock); | 410 | spin_unlock(&im->ino_lock); |
411 | } | 411 | } |
412 | 412 | ||
413 | void add_dirty_inode(struct f2fs_sb_info *sbi, nid_t ino, int type) | 413 | void add_ino_entry(struct f2fs_sb_info *sbi, nid_t ino, int type) |
414 | { | 414 | { |
415 | /* add new dirty ino entry into list */ | 415 | /* add new dirty ino entry into list */ |
416 | __add_ino_entry(sbi, ino, type); | 416 | __add_ino_entry(sbi, ino, type); |
417 | } | 417 | } |
418 | 418 | ||
419 | void remove_dirty_inode(struct f2fs_sb_info *sbi, nid_t ino, int type) | 419 | void remove_ino_entry(struct f2fs_sb_info *sbi, nid_t ino, int type) |
420 | { | 420 | { |
421 | /* remove dirty ino entry from list */ | 421 | /* remove dirty ino entry from list */ |
422 | __remove_ino_entry(sbi, ino, type); | 422 | __remove_ino_entry(sbi, ino, type); |
@@ -434,7 +434,7 @@ bool exist_written_data(struct f2fs_sb_info *sbi, nid_t ino, int mode) | |||
434 | return e ? true : false; | 434 | return e ? true : false; |
435 | } | 435 | } |
436 | 436 | ||
437 | void release_dirty_inode(struct f2fs_sb_info *sbi) | 437 | void release_ino_entry(struct f2fs_sb_info *sbi) |
438 | { | 438 | { |
439 | struct ino_entry *e, *tmp; | 439 | struct ino_entry *e, *tmp; |
440 | int i; | 440 | int i; |
@@ -1081,7 +1081,7 @@ static void do_checkpoint(struct f2fs_sb_info *sbi, struct cp_control *cpc) | |||
1081 | invalidate_mapping_pages(META_MAPPING(sbi), discard_blk, | 1081 | invalidate_mapping_pages(META_MAPPING(sbi), discard_blk, |
1082 | discard_blk); | 1082 | discard_blk); |
1083 | 1083 | ||
1084 | release_dirty_inode(sbi); | 1084 | release_ino_entry(sbi); |
1085 | 1085 | ||
1086 | if (unlikely(f2fs_cp_error(sbi))) | 1086 | if (unlikely(f2fs_cp_error(sbi))) |
1087 | return; | 1087 | return; |
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index 0052ae8bea3f..ee8bcbf34f44 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h | |||
@@ -1820,9 +1820,9 @@ bool is_valid_blkaddr(struct f2fs_sb_info *, block_t, int); | |||
1820 | int ra_meta_pages(struct f2fs_sb_info *, block_t, int, int, bool); | 1820 | int ra_meta_pages(struct f2fs_sb_info *, block_t, int, int, bool); |
1821 | void ra_meta_pages_cond(struct f2fs_sb_info *, pgoff_t); | 1821 | void ra_meta_pages_cond(struct f2fs_sb_info *, pgoff_t); |
1822 | long sync_meta_pages(struct f2fs_sb_info *, enum page_type, long); | 1822 | long sync_meta_pages(struct f2fs_sb_info *, enum page_type, long); |
1823 | void add_dirty_inode(struct f2fs_sb_info *, nid_t, int type); | 1823 | void add_ino_entry(struct f2fs_sb_info *, nid_t, int type); |
1824 | void remove_dirty_inode(struct f2fs_sb_info *, nid_t, int type); | 1824 | void remove_ino_entry(struct f2fs_sb_info *, nid_t, int type); |
1825 | void release_dirty_inode(struct f2fs_sb_info *); | 1825 | void release_ino_entry(struct f2fs_sb_info *); |
1826 | bool exist_written_data(struct f2fs_sb_info *, nid_t, int); | 1826 | bool exist_written_data(struct f2fs_sb_info *, nid_t, int); |
1827 | int acquire_orphan_inode(struct f2fs_sb_info *); | 1827 | int acquire_orphan_inode(struct f2fs_sb_info *); |
1828 | void release_orphan_inode(struct f2fs_sb_info *); | 1828 | void release_orphan_inode(struct f2fs_sb_info *); |
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 9949d0f332c2..c6d909e9661e 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c | |||
@@ -275,10 +275,10 @@ sync_nodes: | |||
275 | goto out; | 275 | goto out; |
276 | 276 | ||
277 | /* once recovery info is written, don't need to tack this */ | 277 | /* once recovery info is written, don't need to tack this */ |
278 | remove_dirty_inode(sbi, ino, APPEND_INO); | 278 | remove_ino_entry(sbi, ino, APPEND_INO); |
279 | clear_inode_flag(fi, FI_APPEND_WRITE); | 279 | clear_inode_flag(fi, FI_APPEND_WRITE); |
280 | flush_out: | 280 | flush_out: |
281 | remove_dirty_inode(sbi, ino, UPDATE_INO); | 281 | remove_ino_entry(sbi, ino, UPDATE_INO); |
282 | clear_inode_flag(fi, FI_UPDATE_WRITE); | 282 | clear_inode_flag(fi, FI_UPDATE_WRITE); |
283 | ret = f2fs_issue_flush(sbi); | 283 | ret = f2fs_issue_flush(sbi); |
284 | out: | 284 | out: |
diff --git a/fs/f2fs/inode.c b/fs/f2fs/inode.c index 97e20decacb4..3d2fe595d078 100644 --- a/fs/f2fs/inode.c +++ b/fs/f2fs/inode.c | |||
@@ -357,9 +357,9 @@ no_delete: | |||
357 | if (xnid) | 357 | if (xnid) |
358 | invalidate_mapping_pages(NODE_MAPPING(sbi), xnid, xnid); | 358 | invalidate_mapping_pages(NODE_MAPPING(sbi), xnid, xnid); |
359 | if (is_inode_flag_set(fi, FI_APPEND_WRITE)) | 359 | if (is_inode_flag_set(fi, FI_APPEND_WRITE)) |
360 | add_dirty_inode(sbi, inode->i_ino, APPEND_INO); | 360 | add_ino_entry(sbi, inode->i_ino, APPEND_INO); |
361 | if (is_inode_flag_set(fi, FI_UPDATE_WRITE)) | 361 | if (is_inode_flag_set(fi, FI_UPDATE_WRITE)) |
362 | add_dirty_inode(sbi, inode->i_ino, UPDATE_INO); | 362 | add_ino_entry(sbi, inode->i_ino, UPDATE_INO); |
363 | if (is_inode_flag_set(fi, FI_FREE_NID)) { | 363 | if (is_inode_flag_set(fi, FI_FREE_NID)) { |
364 | if (err && err != -ENOENT) | 364 | if (err && err != -ENOENT) |
365 | alloc_nid_done(sbi, inode->i_ino); | 365 | alloc_nid_done(sbi, inode->i_ino); |
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index a6f2beda22b9..9ee7144c5367 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c | |||
@@ -548,7 +548,7 @@ static void f2fs_put_super(struct super_block *sb) | |||
548 | * normally superblock is clean, so we need to release this. | 548 | * normally superblock is clean, so we need to release this. |
549 | * In addition, EIO will skip do checkpoint, we need this as well. | 549 | * In addition, EIO will skip do checkpoint, we need this as well. |
550 | */ | 550 | */ |
551 | release_dirty_inode(sbi); | 551 | release_ino_entry(sbi); |
552 | release_discard_addrs(sbi); | 552 | release_discard_addrs(sbi); |
553 | 553 | ||
554 | f2fs_leave_shrinker(sbi); | 554 | f2fs_leave_shrinker(sbi); |