diff options
Diffstat (limited to 'fs/f2fs/inode.c')
-rw-r--r-- | fs/f2fs/inode.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/fs/f2fs/inode.c b/fs/f2fs/inode.c index 91ac7f9d88ee..2b2d45d19e3e 100644 --- a/fs/f2fs/inode.c +++ b/fs/f2fs/inode.c | |||
@@ -109,12 +109,6 @@ struct inode *f2fs_iget(struct super_block *sb, unsigned long ino) | |||
109 | ret = do_read_inode(inode); | 109 | ret = do_read_inode(inode); |
110 | if (ret) | 110 | if (ret) |
111 | goto bad_inode; | 111 | goto bad_inode; |
112 | |||
113 | if (!sbi->por_doing && inode->i_nlink == 0) { | ||
114 | ret = -ENOENT; | ||
115 | goto bad_inode; | ||
116 | } | ||
117 | |||
118 | make_now: | 112 | make_now: |
119 | if (ino == F2FS_NODE_INO(sbi)) { | 113 | if (ino == F2FS_NODE_INO(sbi)) { |
120 | inode->i_mapping->a_ops = &f2fs_node_aops; | 114 | inode->i_mapping->a_ops = &f2fs_node_aops; |
@@ -130,8 +124,7 @@ make_now: | |||
130 | inode->i_op = &f2fs_dir_inode_operations; | 124 | inode->i_op = &f2fs_dir_inode_operations; |
131 | inode->i_fop = &f2fs_dir_operations; | 125 | inode->i_fop = &f2fs_dir_operations; |
132 | inode->i_mapping->a_ops = &f2fs_dblock_aops; | 126 | inode->i_mapping->a_ops = &f2fs_dblock_aops; |
133 | mapping_set_gfp_mask(inode->i_mapping, GFP_HIGHUSER_MOVABLE | | 127 | mapping_set_gfp_mask(inode->i_mapping, GFP_F2FS_ZERO); |
134 | __GFP_ZERO); | ||
135 | } else if (S_ISLNK(inode->i_mode)) { | 128 | } else if (S_ISLNK(inode->i_mode)) { |
136 | inode->i_op = &f2fs_symlink_inode_operations; | 129 | inode->i_op = &f2fs_symlink_inode_operations; |
137 | inode->i_mapping->a_ops = &f2fs_dblock_aops; | 130 | inode->i_mapping->a_ops = &f2fs_dblock_aops; |
@@ -199,6 +192,7 @@ void update_inode(struct inode *inode, struct page *node_page) | |||
199 | 192 | ||
200 | set_cold_node(inode, node_page); | 193 | set_cold_node(inode, node_page); |
201 | set_page_dirty(node_page); | 194 | set_page_dirty(node_page); |
195 | clear_inode_flag(F2FS_I(inode), FI_DIRTY_INODE); | ||
202 | } | 196 | } |
203 | 197 | ||
204 | int update_inode_page(struct inode *inode) | 198 | int update_inode_page(struct inode *inode) |
@@ -224,6 +218,9 @@ int f2fs_write_inode(struct inode *inode, struct writeback_control *wbc) | |||
224 | inode->i_ino == F2FS_META_INO(sbi)) | 218 | inode->i_ino == F2FS_META_INO(sbi)) |
225 | return 0; | 219 | return 0; |
226 | 220 | ||
221 | if (!is_inode_flag_set(F2FS_I(inode), FI_DIRTY_INODE)) | ||
222 | return 0; | ||
223 | |||
227 | if (wbc) | 224 | if (wbc) |
228 | f2fs_balance_fs(sbi); | 225 | f2fs_balance_fs(sbi); |
229 | 226 | ||