]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
f2fs: don't invalidate atomic page if successful
authorJaegeuk Kim <jaegeuk@kernel.org>
Tue, 12 Apr 2016 21:11:03 +0000 (14:11 -0700)
committerJaegeuk Kim <jaegeuk@kernel.org>
Fri, 15 Apr 2016 15:50:25 +0000 (08:50 -0700)
If we committed atomic write successfully, we don't need to invalidate pages.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/segment.c

index 299c784f5b61e777d0897bc83b87926688779774..770cdc95120f377543483b89e49364abd807fc78 100644 (file)
@@ -223,9 +223,10 @@ static int __revoke_inmem_pages(struct inode *inode,
                        f2fs_put_dnode(&dn);
                }
 next:
-               ClearPageUptodate(page);
+               /* we don't need to invalidate this in the sccessful status */
+               if (drop || recover)
+                       ClearPageUptodate(page);
                set_page_private(page, 0);
-               ClearPageUptodate(page);
                f2fs_put_page(page, 1);
 
                list_del(&cur->list);