summaryrefslogtreecommitdiffstats
path: root/fs/overlayfs
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2022-11-24 17:03:11 +0000
committerMiklos Szeredi <mszeredi@redhat.com>2022-11-28 11:53:28 +0100
commit456b59e757b0c558df550764a4fd5ae6877e93f8 (patch)
tree7333ceccc18e33383768e3b47cc20c2b14216c26 /fs/overlayfs
parent672e4268b2863d7e4978dfed29552b31c2f9bd4e (diff)
downloadlinux-456b59e757b0c558df550764a4fd5ae6877e93f8.tar.gz
linux-456b59e757b0c558df550764a4fd5ae6877e93f8.tar.bz2
linux-456b59e757b0c558df550764a4fd5ae6877e93f8.zip
ovl: update ->f_iocb_flags when ovl_change_flags() modifies ->f_flags
ovl_change_flags() is an open-coded variant of fs/fcntl.c:setfl() and it got missed by commit 164f4064ca81 ("keep iocb_flags() result cached in struct file"); the same change applies there. Reported-by: Pierre Labastie <pierre.labastie@neuf.fr> Fixes: 164f4064ca81 ("keep iocb_flags() result cached in struct file") Cc: <stable@vger.kernel.org> # v6.0 Link: https://bugzilla.kernel.org/show_bug.cgi?id=216738 Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs/overlayfs')
-rw-r--r--fs/overlayfs/file.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/overlayfs/file.c b/fs/overlayfs/file.c
index a1a22f58ba18..dd688a842b0b 100644
--- a/fs/overlayfs/file.c
+++ b/fs/overlayfs/file.c
@@ -96,6 +96,7 @@ static int ovl_change_flags(struct file *file, unsigned int flags)
spin_lock(&file->f_lock);
file->f_flags = (file->f_flags & ~OVL_SETFL_MASK) | flags;
+ file->f_iocb_flags = iocb_flags(file);
spin_unlock(&file->f_lock);
return 0;