]> git.baikalelectronics.ru Git - kernel.git/commit
afs: afs_write_end() should change i_size under the right lock
authorDavid Howells <dhowells@redhat.com>
Fri, 12 Jun 2020 22:58:51 +0000 (23:58 +0100)
committerDavid Howells <dhowells@redhat.com>
Mon, 15 Jun 2020 14:41:02 +0000 (15:41 +0100)
commit5a03fecd662f66dcc5f23100b0e6940ce7b57603
treefe3ccf578175dc55a56649013676cb78150866b1
parenta49cfdb2dc7935bb3239aea298014301521e2075
afs: afs_write_end() should change i_size under the right lock

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: 19554d2d2903 ("afs: Get rid of the afs_writeback record")
Signed-off-by: David Howells <dhowells@redhat.com>
fs/afs/write.c