From 319c2db26f9d205340ed938163b17c0d55b8f051 Mon Sep 17 00:00:00 2001
From: Guy Zana <guy@cloudius-systems.com>
Date: Wed, 27 Mar 2013 12:55:31 +0200
Subject: [PATCH] fix passing IO_APPEND in sys_write()

ramfs and fatfs rely on it to function properly.
---
 fs/vfs/vfs_fops.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/fs/vfs/vfs_fops.c b/fs/vfs/vfs_fops.c
index 40d094918..876ca7fc3 100644
--- a/fs/vfs/vfs_fops.c
+++ b/fs/vfs/vfs_fops.c
@@ -60,6 +60,10 @@ static int vfs_write(struct file *fp, struct uio *uio, int flags)
 	bytes = uio->uio_resid;
 
 	vn_lock(vp);
+
+	if (fp->f_flags & O_APPEND)
+		ioflags |= IO_APPEND;
+
 	if ((flags & FOF_OFFSET) == 0)
 	        uio->uio_offset = fp->f_offset;
 
-- 
GitLab