Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c8c19fcd authored by David Howells's avatar David Howells Committed by Greg Kroah-Hartman
Browse files

afs: afs_write_end() should change i_size under the right lock



[ Upstream commit 1f32ef79897052ef7d3d154610d8d6af95abde83 ]

Fix afs_write_end() to change i_size under vnode->cb_lock rather than
->wb_lock so that it doesn't race with afs_vnode_commit_status() and
afs_getattr().

The ->wb_lock is only meant to guard access to ->wb_keys which isn't
accessed by that piece of code.

Fixes: 4343d008 ("afs: Get rid of the afs_writeback record")
Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 6a9fd804
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment