mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-17 18:56:24 +00:00
ovl: update ->f_iocb_flags when ovl_change_flags() modifies ->f_flags
commit 456b59e757b0c558df550764a4fd5ae6877e93f8 upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
d84a696c86
commit
bc2e0c5bb9
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user