]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blobdiff - fs/f2fs/inode.c
f2fs: fix fs corruption due to zero inode page
[mirror_ubuntu-zesty-kernel.git] / fs / f2fs / inode.c
index af06bda51a5438a62f58695a8496f2844cf3b4c6..0cf3794a69a722f233b63a7cb89e1f2d041893a3 100644 (file)
@@ -316,7 +316,6 @@ retry:
                } else if (err != -ENOENT) {
                        f2fs_stop_checkpoint(sbi, false);
                }
-               f2fs_inode_synced(inode);
                return 0;
        }
        ret = update_inode(inode, node_page);
@@ -446,6 +445,7 @@ void handle_failed_inode(struct inode *inode)
         * in a panic when flushing dirty inodes in gdirty_list.
         */
        update_inode_page(inode);
+       f2fs_inode_synced(inode);
 
        /* don't make bad inode, since it becomes a regular file. */
        unlock_new_inode(inode);