diff options
author | Filipe Manana <fdmanana@gmail.com> | 2014-04-26 01:35:31 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-06-30 20:14:02 -0700 |
commit | 2501c4a066e633524791e8ce8dbfe615aca071cf (patch) | |
tree | 02a4d3393ea355964fcb9495c78373c346b680e8 /fs/compat_binfmt_elf.c | |
parent | bddf0faccf1dd39ec80059eb5266766e6bf0134c (diff) |
Btrfs: read inode size after acquiring the mutex when punching a hole
commit a1a50f60a6bf4f861eb94793420274bc1ccd409a upstream.
In a previous change, commit 12870f1c9b2de7d475d22e73fd7db1b418599725,
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>
Diffstat (limited to 'fs/compat_binfmt_elf.c')
0 files changed, 0 insertions, 0 deletions