Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1714690 > unrolled thread

[PATCH] f2fs: trigger normal fsync for non-atomic_write file

Started byChao Yu <yuchao0@huawei.com>
First post2017-08-18 10:30 +0200
Last post2017-08-18 10:30 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH] f2fs: trigger normal fsync for non-atomic_write file Chao Yu <yuchao0@huawei.com> - 2017-08-18 10:30 +0200

#1714690 — [PATCH] f2fs: trigger normal fsync for non-atomic_write file

FromChao Yu <yuchao0@huawei.com>
Date2017-08-18 10:30 +0200
Subject[PATCH] f2fs: trigger normal fsync for non-atomic_write file
Message-ID<ufKPg-VO-29@gated-at.bofh.it>
If file was not opened with atomic write mode, but user uses atomic write
ioctl to fsync datas, in the flow, we should not fsync that file with
atomic write mode.

Fixes: 608514deba38 ("f2fs: set fsync mark only for the last dnode")
Signed-off-by: Chao Yu <yuchao0@huawei.com>
---
 fs/f2fs/file.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index 3fe8f2ab0222..c93cf2a00395 100644
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@ -1698,7 +1698,7 @@ static int f2fs_ioc_commit_atomic_write(struct file *filp)
 			stat_dec_atomic_write(inode);
 		}
 	} else {
-		ret = f2fs_do_sync_file(filp, 0, LLONG_MAX, 0, true);
+		ret = f2fs_do_sync_file(filp, 0, LLONG_MAX, 0, false);
 	}
 err_out:
 	inode_unlock(inode);
-- 
2.13.1.388.g69e6b9b4f4a9

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web