]> Git Repo - linux.git/commit
ext4: Fix locking hierarchy violation in ext4_fallocate()
authorAneesh Kumar K.V <[email protected]>
Fri, 15 Feb 2008 17:47:21 +0000 (12:47 -0500)
committerTheodore Ts'o <[email protected]>
Fri, 15 Feb 2008 17:47:21 +0000 (12:47 -0500)
commit55bd725aa3a83b3935988f37275b5a80e10d4169
tree9e4c092830eafbb0036892d578d4075689ef81df
parent642be6ec218b956fbae88304449720f76ba0d578
ext4: Fix locking hierarchy violation in ext4_fallocate()

ext4_fallocate() was trying to acquire i_data_sem outside of
jbd2_start_transaction/jbd2_journal_stop, which violates ext4's locking
hierarchy.  So we take i_mutex to prevent writes and truncates during
the complete fallocate operation, and use ext4_get_block_wrap() which
acquires and releases i_data_sem for each block allocation.

Signed-off-by: Aneesh Kumar K.V <[email protected]>
Signed-off-by: Mingming Cao <[email protected]>
Signed-off-by: "Theodore Ts'o" <[email protected]>
fs/ext4/extents.c
This page took 0.053476 seconds and 4 git commands to generate.