]> git.baikalelectronics.ru Git - kernel.git/commit
afs: Fix setting of i_blocks
authorDavid Howells <dhowells@redhat.com>
Thu, 20 Jun 2019 17:12:02 +0000 (18:12 +0100)
committerDavid Howells <dhowells@redhat.com>
Thu, 20 Jun 2019 17:12:02 +0000 (18:12 +0100)
commitc56cda67741497ed97d56d101a0a6fd68e2a1755
tree87a3f6b496fbc9ba07010749e7fcb76ce25dab57
parentd0ef2a19f5069c29e6b308d54c17b6f033c3560a
afs: Fix setting of i_blocks

The setting of i_blocks, which is calculated from i_size, has got
accidentally misordered relative to the setting of i_size when initially
setting up an inode.  Further, i_blocks isn't updated by afs_apply_status()
when the size is updated.

To fix this, break the i_size/i_blocks setting out into a helper function
and call it from both places.

Fixes: 2610d98b734d ("afs: Fix application of status and callback to be under same lock")
Signed-off-by: David Howells <dhowells@redhat.com>
fs/afs/inode.c