f2fs: clear append/update flags once fsync is done
authorJaegeuk Kim <jaegeuk@kernel.org>
Mon, 2 Mar 2015 18:48:56 +0000 (10:48 -0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Fri, 10 Apr 2015 22:08:33 +0000 (15:08 -0700)
When fsync is done through checkpoint, previous f2fs missed to clear append
and update flag. This patch fixes to clear them.

This was originally catched by Changman Lee before.

Signed-off-by: Changman Lee <cm224.lee@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/file.c

index 99cec04fa96eedfbd4675a627f5f5f614ff2e6c0..5e8850edc5cca464b2cabe9d04bb5b8dd02deee1 100644 (file)
@@ -241,6 +241,8 @@ go_write:
                 * will be used only for fsynced inodes after checkpoint.
                 */
                try_to_fix_pino(inode);
+               clear_inode_flag(fi, FI_APPEND_WRITE);
+               clear_inode_flag(fi, FI_UPDATE_WRITE);
                goto out;
        }
 sync_nodes: