[Devel] [PATCH RH8] ve/msync: fix wrong behaviour of fs.fsync-enable
Pavel Tikhomirov
ptikhomirov at virtuozzo.com
Tue Jul 13 10:55:47 MSK 2021
When FSYNC_NEVER is set in container (in fs.fsync-enable sysctl) syncs
should be ignored instead of failing with ENOMEM as we have now.
https://jira.sw.ru/browse/PSBM-131652
Fixes: a3d65258a0a1 ("ve/fs/sync: Per containter sync and syncfs and
fs.fsync-enable sysctl")
Signed-off-by: Pavel Tikhomirov <ptikhomirov at virtuozzo.com>
---
mm/msync.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/msync.c b/mm/msync.c
index 3a79d8f2be4d..c329fee0fd6c 100644
--- a/mm/msync.c
+++ b/mm/msync.c
@@ -48,9 +48,9 @@ SYSCALL_DEFINE3(msync, unsigned long, start, size_t, len, int, flags)
end = start + len;
if (end < start)
goto out;
+ error = 0;
if (ve_fsync_behavior() == FSYNC_NEVER)
goto out;
- error = 0;
if (end == start)
goto out;
/*
--
2.31.1
More information about the Devel
mailing list