summaryrefslogtreecommitdiffstats
path: root/fs/jbd2
diff options
context:
space:
mode:
authorHarshad Shirwadkar2018-01-10 06:13:13 +0100
committerTheodore Ts'o2018-01-10 06:13:13 +0100
commitabbc3f9395c76d554a9ed27d4b1ebfb5d9b0e4ca (patch)
tree463181185ebf743f7dbee86b6215b20302b59b33 /fs/jbd2
parentmbcache: make sure c_entry_count is not decremented past zero (diff)
downloadkernel-qcow2-linux-abbc3f9395c76d554a9ed27d4b1ebfb5d9b0e4ca.tar.gz
kernel-qcow2-linux-abbc3f9395c76d554a9ed27d4b1ebfb5d9b0e4ca.tar.xz
kernel-qcow2-linux-abbc3f9395c76d554a9ed27d4b1ebfb5d9b0e4ca.zip
ext4: fix a race in the ext4 shutdown path
This patch fixes a race between the shutdown path and bio completion handling. In the ext4 direct io path with async io, after submitting a bio to the block layer, if journal starting fails, ext4_direct_IO_write() would bail out pretending that the IO failed. The caller would have had no way of knowing whether or not the IO was successfully submitted. So instead, we return -EIOCBQUEUED in this case. Now, the caller knows that the IO was submitted. The bio completion handler takes care of the error. Tested: Ran the shutdown xfstest test 461 in loop for over 2 hours across 4 machines resulting in over 400 runs. Verified that the race didn't occur. Usually the race was seen in about 20-30 iterations. Signed-off-by: Harshad Shirwadkar <harshads@google.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu> Cc: stable@vger.kernel.org
Diffstat (limited to 'fs/jbd2')
0 files changed, 0 insertions, 0 deletions