ovl: check IOCB_APPEND flag

Message ID 20221120034143.684416-1-o451686892@gmail.com
State New
Headers
Series ovl: check IOCB_APPEND flag |

Commit Message

Weizhao Ouyang Nov. 20, 2022, 3:41 a.m. UTC
  Add *_APPEND flag for ovl_iocb_to_rwf().

Signed-off-by: Weizhao Ouyang <o451686892@gmail.com>
---
 fs/overlayfs/file.c | 2 ++
 1 file changed, 2 insertions(+)
  

Comments

Miklos Szeredi Nov. 24, 2022, 1:03 p.m. UTC | #1
On Sun, 20 Nov 2022 at 04:42, Weizhao Ouyang <o451686892@gmail.com> wrote:
>
> Add *_APPEND flag for ovl_iocb_to_rwf().

Why?

Thanks,
Miklos
  

Patch

diff --git a/fs/overlayfs/file.c b/fs/overlayfs/file.c
index a1a22f58ba18..ed286dd0e719 100644
--- a/fs/overlayfs/file.c
+++ b/fs/overlayfs/file.c
@@ -244,6 +244,8 @@  static rwf_t ovl_iocb_to_rwf(int ifl)
 {
 	rwf_t flags = 0;
 
+	if (ifl & IOCB_APPEND)
+		flags |= RWF_APPEND;
 	if (ifl & IOCB_NOWAIT)
 		flags |= RWF_NOWAIT;
 	if (ifl & IOCB_HIPRI)