diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2022-11-24 20:03:11 +0300 |
---|---|---|
committer | Miklos Szeredi <mszeredi@redhat.com> | 2022-11-28 13:53:28 +0300 |
commit | 456b59e757b0c558df550764a4fd5ae6877e93f8 (patch) | |
tree | 7333ceccc18e33383768e3b47cc20c2b14216c26 /fs/overlayfs | |
parent | 672e4268b2863d7e4978dfed29552b31c2f9bd4e (diff) | |
download | linux-456b59e757b0c558df550764a4fd5ae6877e93f8.tar.xz |
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.c | 1 |
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; |