diff options
author | Ernesto A. Fernández <ernesto.mnd.fernandez@gmail.com> | 2018-08-22 06:59:16 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-08-22 19:52:50 +0200 |
commit | 31651c607151f1034cfb57e5a78678bea54c362b (patch) | |
tree | b8868dcd8dd0330edeec238bb83716be61b3d314 /Kbuild | |
parent | hfsplus: don't return 0 when fill_super() failed (diff) | |
download | linux-31651c607151f1034cfb57e5a78678bea54c362b.tar.xz linux-31651c607151f1034cfb57e5a78678bea54c362b.zip |
hfsplus: avoid deadlock on file truncation
After an extent is removed from the extent tree, the corresponding bits
are also cleared from the block allocation file. This is currently done
without releasing the tree lock.
The problem is that the allocation file has extents of its own; if it is
fragmented enough, some of them may be in the extent tree as well, and
hfsplus_get_block() will try to take the lock again.
To avoid deadlock, only hold the extent tree lock during the actual tree
operations.
Link: http://lkml.kernel.org/r/20180709202549.auxwkb6memlegb4a@eaf
Signed-off-by: Ernesto A. Fernández <ernesto.mnd.fernandez@gmail.com>
Reported-by: Anatoly Trosinenko <anatoly.trosinenko@gmail.com>
Cc: Viacheslav Dubeyko <slava@dubeyko.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'Kbuild')
0 files changed, 0 insertions, 0 deletions