mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-10-16 22:39:48 +00:00
Btrfs: read inode size after acquiring the mutex when punching a hole
commita1a50f60a6upstream. In a previous change, commit12870f1c9b, I accidentally moved the roundup of inode->i_size to outside of the critical section delimited by the inode mutex, which is not atomic and not correct since the size can be changed by other task before we acquire the mutex. Therefore fix it. Signed-off-by: Filipe David Borba Manana <fdmanana@gmail.com> Signed-off-by: Chris Mason <clm@fb.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
bddf0faccf
commit
2501c4a066
1 changed files with 2 additions and 1 deletions
Loading…
Add table
Add a link
Reference in a new issue